Posts

Image
Hi Folks, Hope you all are doing good. Would like to start with praying for all those who have been affected by a deadly earthquake in Nepal. Just when it seems that life is good something like this happens, to remind us of that we are not permanent here. Death is a bitter truth. Moving on this week I again ran into one of the bugs in reporting services 2005 i.e. we cannot have aggregates of aggregates in a situation where we have a parent group and a child group. Requirement -    See the resultset below pid pdesc cid cdesc 1 harish 1 ninu 1 harish 2 lovely 2 asha        3  ricky 2 asha   4 hina We have 2 groups one is parent having pid has the identifier and second group is child having cid as the identifier We want to calculate the sum of cids accross parent and child group (off-course at child level it would be the individual cid itself) Implementation -  so I have written the expression sum(Fields!...

Data Rendering Eye Opener SSRS

Hi Folks Greetings to everyone!!! So last week one of the report was having a performance issue. It had 10 datasets ,5 data regions and a report parameter. Regions displayed cascading information based on user's selection of parameter. For example,. lets assume the parameter name to be ReportLevel, it would have 3 possible values - Country, State, City. This being a multi valued parameter will decide which data region to be displayed. In this example we will have 3 datasets binded to 3 tablix or tables or data regions. So if user selects Country only than country data region will be displayed and like wise Country and city level details will only be shown if the user selects the value as country, city. Now I assumed (most of you guys would already know the correct behaviour :-) ), only those datasets or queries would be executed which are being displayed. On further having a discussion with one of my friend and an expertise in SSRS, I came to know that all datasets will ...

Toggle Functionality Looses In excel--ssrs 2005

Image
Hi Folks Highlighting on the issue that I faced last week while working on reporting services 2005. Requirement :- A data region (table) is to be displayed based on the parameter value. Table has a toggle facility on detail rows of a group like so on export to excel it should look like this  Solution :- I found out that is a known issue in ssrs 2005. On adding an expression at the visibility property of the data region it looses the toggle functionality in the excel. However it works fine with 2012 reporting services. Your comments and feedback are welcome here.

Date Range Challenge in sql

Image
Hi Folks, When you work in a offshore - onsite setup in IT industry and if you are fortunate :-) to be a part of the offshore team then there are many compromises that you have to make. Out of those one such is to develop your code based on some illogical limitations enforced upon you by the onsite development/dba team. That is where you improvise and learn. I am going to throw some light on one such situation I faced in my last project. But this time thankfully the onsite dba gave me some tips to go about my task. Requirement :- You are given a database that has some tables in it. However we cannot access these tables directly so we are given access to some user defined functions only. For example one such table is emp_man which looks like this: and there is udf corresponding to this i.e. ///////////////////////////////////////////////////////////////////////////////////////////// create function ufn_getempl (@hrdate datetime) returns table   as   return ...

CTE - Limitations

Hi Wanted to explore one of the major limitation of CTE in sql 2012 i.e. it cannot be used inside if else statement . This is something basic as the definition of cte that it must be followed by a select, insert, update or delete statement. That is we cannot have following condition:- with cte ( ) if select cte else select cte end Thanks

Bug In ado.net enumerator in foreach loop in SSIS 2012

Hi Greetings to everyone, Today I am going to report a bug in SSIS 2012. In one of the packages I was using execute sql task and then using ado.net foreach loop enumerator. My execute sql task had a simple select statement like - 'select c1,c2,c3 from table' where c1,c2,c3 were integer columns. Based on the rows returned I was running foreach loop container and assigning values from the columns to the variables of datatype Int32 inside SSIS package. However on executing the package it was returning an error message such as Error: The type of the value (Int32) being assigned to variable "User::result1" differs from the current variable type (Int64). Variables may not change type during execution. Variable types are strict, except for variables of type Object. While researching I found that this is a bug in ssis - http://connect.microsoft.com/SQLServer/feedback/details/732413/foreach-ado-enumerator-returns-error-when-bigint-and-int64-are-used Solution - ...

PROVIDING LOGGING INFORMATION AT COMMAND LINE

For providing logging information at command line utility use the option /l for example dtexe /f "some path" /l "logging type; connection string" refer to this useful link : - http://technet.microsoft.com/en-us/library/ms162810(v=sql.105).aspx Note : - connection string actually refers to the connection manager name or file path whatever you are using in your package.