Skip to main content

Posts

Showing posts from July, 2013

Using custom code in SSRS

Step by step to add custom code in SSRS Introduction SSRS custom code extends re-usability of certain logic in multiple places inside a report. It also helps get rid of writing lengthy calculations in many places with a function. SSRS 2005/2008R2 allows us to write custom codes in VB. If somebody is familiar with C# can choose another option called - Custom Assembly. We will create a sample report with a simple Custom code which will accept two numbers and return the greater of two. So for the sample report I have a given table  Test table with three columns A,B,C Now we will try creating a report from the source data so first we will add a new report in BIDS SSRS project. create proper data source and data set referring to the above table. Now first we will go to Report Property and will click on the Code portion and write the below code. After writing the code we will drag a table and will specify all the columns and will add one extra column that will...

Using merge join without Sort transformation

Merge join without SORT Transformation Merge join requires the IsSorted property of the source to be set as true and the data should be ordered on the Join Key. So when we add a SORT transformation it sets the IsSorted property of the source data to true and allows the user to define a column on which we want to sort the data ( the column should be same as the join key). Now to avoid the using SORT transformation we need to set the metadata of the source properly for successful processing of the data else we get error as IsSorted property is not set to true. We will try to join two tables Department and Employee on DeptID column without using SORT transformation in our SSIS package. Department Table details Employee Table details Steps in SSIS package Create a new package and drag a dataflow task. Now right click on Data-flow and click on edit, the data-flow container opens. First task is to create a connection to the database.    Now w...