Tuesday, 12 August 2008

Custom Management Studio Reports

You know how when you right-click somewhere in the Objects pane under SSMS, you get that context sensitive reports menu. You can create your own custom reports real easily. At it most basic a SSMS report is an .rdl file from Reporting Services. In this example, i'll go over creating a basic custom report, and deploying it on the server.


Okay, to start with start an instance of Business Intelligence Studio; now create a [New] [Business Intellegence Project] [Report Server Project Wizard]

Now follow the wizard through, adding your data source, login details and finally the query you wish to report (any valid SQL Statement). I'm going to use the following to demonstrate:

select * from master..sysprocess

Now, finish the wizard.

You should be able to run the report, this will let you test to ensure everything reports correctly. You will now need to deploy this at the server.

Either locate the .rdl file, or save it again, using the file menu.

Now back in SSMS, right click on the database, or database group folder (depending which level you want your report to belong) point to reports..custom reports (click).

Locate your .rdl file you created previous, and click open. This will run your report and add it to the context menu.