Custom Reports in Management Studio
One of the improvement areas we've introduced in Service Pack 2 is the ability to run your own reports inside Management Studio. Here is a draft of the Books Online topics. This is subject to change at any time.
The November CTP of Service Pack 2 can be obtained here: https://www.microsoft.com/sql/ctp.mspx.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
Custom Reports in Management Studio
Introduction
Many Object Explorer nodes in SQL Server Management Studio display a set of standard reports created by Microsoft which summarize typically requested server information. Starting with SQL Server 2005 service pack 2, SQL Server Managemetn Studio lets administrators run custom reports created in SQL Server Business Intelligence Development Studio from SQL Server Management Studio.
Implementation
Custom reports stored as report definition (.rdl) files are created by using Report Definition Language (RDL). RDL contains data retrieval and layout information for a report in an XML format. RDL is an open schema; developers can extend RDL with additional attributes and elements. Reports may execute any valid tsql statement within the report.
If Object Explorer is connected to a server, custom reports can execute in the context of the current Object Explorer selection if they reference that node's report parameters. This enables a report to use the current context, such as the current database, or a consistent context, such as specifying a designated database as part of the tsql statement that is contained in the custom report.
Running a Custom Report
A custom report may be run in two ways in SQL Server Management Studio:
- Right-click a node in Object Explorer, point to Reports and left-click Custom Reports. Using the Open File dialog box, browse to a folder that contains .rdl files and open the appropriate report file.
- Right-click a node in Object Explorer, point to Reports, point to Custom Reports and select a custom report from the most recently used file list.
Limitations
- To prevent the unintended execution of malicious code, SQL Server Management Studio cannot be configured to automatically run a report, even if the file system is configured to associate rdl files with SQL Server Management Studio. Reports cannot be programmatically executed in SQL Server Management Studio, and cannot run from the command line through SQL Server Management Studio.
- You can run custom reports in a context that does not produce the expected values. For example, you can run a report regarding replication in the context of a database which is not involved in replication, or run a report as a user who does not have permission to access information that is required to generate an accurate report. The creator of the custom report is responsible for the validity of the report structure and its context.
- You cannot add a custom report to the list of standard reports.
- The code processed by the report may affect server performance.
- Custom reports will not support subreports.
- The command text for each query within the report must not be defined through an expression
- Any query parameter used in a command (query) can only reference a single report parameter and cannot use any expression operators.
- Only Text and Stored Procedure command types are supported for report commands (queries)
- The report framework does not provide any parameter escaping for the queries. The query author needs to ensure that the queries are free from SQL injection attacks.
Managing Custom Reports
We recommend that users who have many custom reports organize them using file system folders.
Permissions
Custom reports run using the permissions of the current user. Permissions on the file system folder that contains the report files should be set to restrict access to prevent a malicious user from changing the queries run by the report.
Both the user and the account that is used by the SQL Serverservice require read access to the file system folder that contains the report files.
Any valid .NET command can be embedded in a report but it will not be executed.
Warning Any valid T-SQLstatement can be embedded in and executed from a report. Running a report under a high privileged user account makes it possible that any of these embedded instructions can execute without challenge.
How to: Add a Custom Report to Management Studio
Introduction
This topic describes how to create a simple SQL Server Reporting Services report saved as an .rdl file, and then add that rdl file to SQL Server Management Studio as a custom report. This topic focuses on adding the report to Management Studio. SQL Server Reporting Services can create a wide variety of sophisticated reports. For more information about creating reports, see Reporting Services Tutorials. To create a report using this topic, you must have SQL Server Business Intelligence Development Studio installed on your computer. You do not need to install SQL Server Reporting Services to run a custom report using Management Studio.
Procedures
To create a simple report saved as an rdl file |
|
To add a report to Management Studio |
|
Comments
Anonymous
November 21, 2006
Following on from my last post, Microsoft have now published some documentation on creating custom reportsAnonymous
November 22, 2006
Do you want the taskpad view in Management Studio then you need to download Jaspers custom report whichAnonymous
November 22, 2006
Do you want the taskpad view in Management Studio then you need to download Jaspers custom report...Anonymous
November 22, 2006
Do you want the permission view that is avialble in Enterprise Manager for roles well you need...Anonymous
November 22, 2006
Do you want the permission view that is avialble in Enterprise Manager for roles well you need to downloadAnonymous
November 28, 2006
We introduced a cool new feature in SP2 of SQL Server 2005 that lets users access their own reports fromAnonymous
December 01, 2006
Hello, there! You’ve somehow managed to navigate your way through the blogosphere and into the...Anonymous
January 08, 2007
Hello, there! You’ve somehow managed to navigate your way through the blogosphere and into the 21st editionAnonymous
October 06, 2007
We introduced a cool new feature in SP2 of SQL Server 2005 that lets users access their own reports from