
close
close
SQL Server 2005, 2008 and 2008 R2 all come packaged with SQL Server Reporting Services (SSRS) – an enterprise-level reporting solution. With SSRS, you can create, schedule, publish, and manage a multitude of reports using a variety of data sources.
SSRS components include:
advertisment
The following sections demonstrate how to create a new SSRS project, a shared data source, and a report based on the AdventureWorks database.
A project is the container for all objects – for example, reports or SSIS packages – in BIDS. Each project is of a certain type; you can create a SSIS or other project, but today we want a SSRS project.
You now have an empty SSRS project open in BIDS. If the Solution Explorer is not visible, click on the Solution Explorer tab on the right, or select View > Solution Explorer. This window displays the project name, and all the objects associated with the current project.
advertisment
SSRS data sources can be either embedded in reports, or shared among reports within a project. A shared data source is a separate object from your reports. If or when your data source changes – for example, if the source database moves to a new server – you must only change one shared data source, instead of dozens (or hundreds) of individual embedded report data sources.
To create a shared data source:
You can create your report in SSRS either with the report wizard, or from scratch. To create a report with the wizard:
advertisment
SELECT P.Name ,
ProductNumber ,
Color ,
ListPrice ,
SC.Name [Category]
FROM Production.Product P
LEFT OUTER JOIN Production.ProductSubCategory SC
ON P.ProductSubCategoryID = SC.ProductSubCategoryID
WHERE P.ProductSubCategoryID IS NOT NULL
AND P.Color IS NOT NULL
ORDER BY Category, ListPrice ASC
Your report will appear in the design tab. To view the finished report with data, click the Preview tab.
In the Design tab, you can edit your report in a number of ways. For example:
This brief introduction only skims the surface of SSRS functionality. Read more about SSRS in upcoming installments of this SQL Server Reporting Services series, and in the references listed below.
References:
More in SQL Server
Microsoft Introduces SQL Server Information Protection Sensitivity Labels
Apr 19, 2022 | Rabia Noureen
Most popular on petri