Pages

Tuesday, September 9, 2014

Add custom code to report builder/SSRS



Sometimes ,your requirement may not be done with the default functions or custom expressions.This is when the custom code comes into picture.Following are the steps to embed the custom code in the Report builder/SSRS

1.In Design mode,right click outside the border of the report and click on Report properties
2.Click on code
3.Add the custom code to the window as shown below.
4.Click Ok.(Errors are only shown when you run the report)
5.Following is the way to call the code  in the  corresponding cell of the report.


=Code.BatchServiceStatusString(Fields!BatchServiceStatus.Value)


                The meaning of the above code snippet is for the corresponding Fields!BatchServiceStatus.Value there would be a corresponding return value based on the condition satisfied.


Thursday, September 4, 2014

To hide static columns in a matrix, list , or table(Report Builder/SSRS)



  1. In Design view, select the table, matrix, or list to display the row and column handles.
  2. Right-click the column handle, and then click Column Visibility.
  3. In the Column Visibility dialog box, follow the below steps
  4. In When the report is initially run, specify whether to hide the item when you first view the report:
    • To display the item, click Show.
    • To hide the item, click Hide.
    • To specify an expression that is evaluated at run-time, click Show or hide based on an expression. Type the expression or click the expression (fx) button to create the expression in the Expression dialog box.  




how to hide static rows in report builder and SSRS

  1. In report design view, click the table, matrix, or list to display the row and column handles.
  2. Right-click the row handle, and then click Row Visibility. The Row Visibility dialog box opens.
  3. To set the visibility, follow  the below steps
  4. In When the report is initially run, specify whether to hide the item when you first view the report:
    • To display the item, click Show.
    • To hide the item, click Hide.
    • To specify an expression that is evaluated at run-time, click Show or hide based on an expression. Type the expression or click the expression (fx) button to create the expression in the Expression dialog box. 


Hide an Item (Report Builder and SSRS)

In report design view, right-click the report item and open its Properties page.
  1. Click Visibility.
  2. In When the report is initially run, specify whether to hide the item when you first view the report:
    • To display the item, click Show.
    • To hide the item, click Hide.
    • To specify an expression that is evaluated at run-time, click Show or hide based on an expression. Type the expression or click the expression (fx) button to create the expression in the Expression dialog box. 
3.       Click Ok twice.



how to see the properties pane in report builder

Sometimes we accidentally close the properties pane .To get the properties pane back you need to click on the view tab and check the properties as shown below in the figure.




How to repeat headers in Report Builder/SSRS




Following is the process to repeat the headers on every page in the report Builder 

Select the arrow to the bottom right corner to get the advanced as shown in the figure.

Click on the Advanced  Mode Button in the Column Groups.Once you click the Advanced Mode you would be able to see the static rows in the row groups as shown below.
  

Select the header which you want to repeat on each page and set the properties KeepwithGroup to After and RepeatOnNewPage to True as shown below.


Apply the report properties to all the static rows that you want to repeat on every page.This should repeat headers on every page .


An item with the same key has already been added.

When i got this issue  i cross checked the query for the repetition of  the column names.I have removed the repeated column names that has already been added  and this solved my issue.