Wednesday, July 6, 2016

How to Show the Serial Number in Reports Automatically Using Expression

Using expressions you can add Serial Numbers to reports automatically. i used adventureworks database
 if you want reproduce same scenario use below query in dataset 

SELECT FirstName+MiddleName+LastName as Fullname ,PersonType fROM [Person].[Person] where MiddleName is not null

Check below image to add serial number expression in ssrs report
Paste this expression =RowNumber(nothing) and click ok

Preview the report.

If you want to run your serial numbers based on columns data use below expression

=RunningValue(Fields!YourColumnName.Value, CountDistinct, "Dataset")

Monday, July 4, 2016

How to Keep Headers Visible When Scrolling Through a Report

To keep Tablix group headers visible while scrolling

1.    Right-click the row, column, or corner handle of a Tablix data region, and then click Tablix Properties.
2.    On the General tab, under Row Headers or Column Headers, select Header should remain visible while scrolling.

3.    Click OK.

To keep a static Tablix member (row or column) visible while scrolling

1.    On the design surface, click the row or column handle of the Tablix data region to select it. The Grouping pane displays the row and column groups.
2.    On the right side of the Grouping pane, click the down arrow, and then click Advanced Mode.

3.    The Row Groups pane displays the hierarchical static and dynamic members for the row group’s hierarchy and the Column group’s pane shows a similar display for the column group’s hierarchy. Press f4 to see static properties
4.    Click the static member (row or column) that you want to remain visible while scrolling. The Properties pane displays the Tablix Member properties.
5.    In the Properties pane, set FixedData to True.
6.    Repeat this for as many adjacent members as you want to keep visible while scrolling.
7.    Preview the report.