Retrieving Report Information (SSRS 2005)

Sql Server Reporting Services provides a few global collections that you can use in your reports to retrieve report information. One such collection is Globals

Globals contains global variables which can display information such as the report name, execution time or page number. You can use these variables as expressions in a textbox and place these textboxes in the report footer. Some of the expressions are as follows:

Execution Time :

= "Your report executed at " & Globals.ExecutionTime

Page Number :

="You are viewing page " & Globals.PageNumber & " of " & Globals.TotalPages

Report Path and Name :

=Globals.ReportFolder & Globals.ReportName

Similary you can also explore Globals.ExecutionTime which displays the execution date and time as well as Globals.ReportServerUrl which displays the URL of the SSRS server on which the report is being executed.

No comments:

Post a Comment