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.

About The Author

Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of DotNetCurry, DNC Magazine for Developers, SQLServerCurry and DevCurry. He has also authored a couple of books 51 Recipes using jQuery with ASP.NET Controls and a new one recently at The Absolutely Awesome jQuery CookBook.

Suprotim has received the prestigous Microsoft MVP award for nine times in a row now. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that represents premium web sites and digital publications comprising of Professional web, windows, mobile and cloud developers, technical managers, and architects.

Get in touch with him on Twitter @suprotimagarwal, LinkedIn or befriend him on Facebook

No comments: