SSRS : The Reporting Services Architecture
PS: The images are resized, click on the image to get the original size of the image.
For a Relatively new Product, Reporting Services has a quite complex architecture. The full Reporting Services architecture includes development tools, administration tools and report viewers. There are a number of ways to get to Reporting Services Programmatically, including SOAP and WMI interfaces.
Figure 1 Shows a simplified diagram of the main Reporting Services components that we will be using.
PS: The images are resized, click on the image to get the original size of the image.
For a Relatively new Product, Reporting Services has a quite complex architecture. The full Reporting Services architecture includes development tools, administration tools and report viewers. There are a number of ways to get to Reporting Services Programmatically, including SOAP and WMI interfaces.
Figure 1 Shows a simplified diagram of the main Reporting Services components that we will be using.
Figure 1: Report Server Architecture
- Report Server is the core engine that drives Reporting Services.
- Report Manager is a Web-based administrative interface for Reporting Services.
- Report Designer is a developer tool for building complex reports.
- Report Builder is a simplified end-user tool for building reports.
- The Report Server database stores report definitions. Reports themselves can make use of data from many different data sources.
SSRS: Using Report Designer
Reporting Services includes two tools for creating reports:
We will start our Reporting services with Report Designer. Report Designer runs inside the Business Intelligence Development Studio shell and offers several ways to create reports. You can either use the Report Wizard to quickly create a Report or you can use a set of design tools to build a report from scratch. You can also use the design tools to modify a report created with the wizard.
Using the Report Wizard
The easiest way to create a report in Report Designer is to use the Report Wizard. Like all wizards, the Report Wizard walk you through the process in step-by-step fashion. You can make the following choices in the wizard.
The easiest way to create a report in Report Designer is to use the Report Wizard. Like all wizards in step-by-step fashion. You can make the following choices in the wizard:
To create a simple report using the Report Wizard, follow these steps as mentioned below:
- Report Designer can create reports of any complexity that Reporting Services supports, but requires you to understand the structure of your data and to be able to navigate the Visual Studio user interface.
- Report Builder provides a simpler user interface for creating ad hoc reports, directed primarily at business users rather than developers. Report Builder requires a developer or administrator to set up a data model before end users can create reports.
We will start our Reporting services with Report Designer. Report Designer runs inside the Business Intelligence Development Studio shell and offers several ways to create reports. You can either use the Report Wizard to quickly create a Report or you can use a set of design tools to build a report from scratch. You can also use the design tools to modify a report created with the wizard.
Using the Report Wizard
The easiest way to create a report in Report Designer is to use the Report Wizard. Like all wizards, the Report Wizard walk you through the process in step-by-step fashion. You can make the following choices in the wizard.
The easiest way to create a report in Report Designer is to use the Report Wizard. Like all wizards in step-by-step fashion. You can make the following choices in the wizard:
- The Data source to use.
- The query to use to retrieve data.
- Whether to use a tabular or matrix layout for the report.
- How to group the retrieved data.
- What visual style to use.
- Where to deploy the finished report.
To create a simple report using the Report Wizard, follow these steps as mentioned below:
- Launch Business Intelligence Development Studio->Start Menu->Program Files->SQL Server 2005->Business Intelligence Development Studio.
- Select File->New->Project.
- Select Business Intelligence Projects, Project Type.
- Select the Report Server Project Wizard template.
- Name the new Report as ProductReport1 and select a desired location to save the Project.
- Now Click OK.
- Read the first page of the Report Wizard and click Next.
- Name the new Data source AdventureWorksDS.
- Click the Edit Button.
- Log on to your Test Server.
- Select the AdventureWorks Database and then Click OK.
- Click the Credentials button then select Use Windows Authentication and Click OK.
- Check the Make this is a shared Data Source Check Box. This will make this particular data source available to other Reporting Services applications in the future and Click on Next button.
- Click on the Query Builder Button, if the full query designer interface does not display by default then click the query designer toolbar button at the far left end of the toolbar.
Figure 2 shows the full query designer interface.

Figure 2:Query Builder.
15. Click the Add table toolbar button and then Select the Product table and Click Add.
16. Click on the Close button
17. Check the Name, ProductNumber,Color, and ListPrice Columns and then Click OK.
18. Click on Next button and then Select the Tabular Layout and Click Next.
19. Now Move the Color column to the Group area and the other three columns to the
Detail area as show in Figure 3
16. Click on the Close button
17. Check the Name, ProductNumber,Color, and ListPrice Columns and then Click OK.
18. Click on Next button and then Select the Tabular Layout and Click Next.
19. Now Move the Color column to the Group area and the other three columns to the
Detail area as show in Figure 3

Figure 3: Grouping columns in the report.
2o. Click on Next button and Select the Stepped layout and Click on Next again.
21. Select the Ocean style and Click on Next button.
22. Accept the default deployment location and then Click on Next button.
23. Now Name the report ProductReport1.
24. Check the option Preview Report Check box and the click on Finish Button.
Figure 18-4 Figure 4 shows the finished report, Open in Report Designer
21. Select the Ocean style and Click on Next button.
22. Accept the default deployment location and then Click on Next button.
23. Now Name the report ProductReport1.
24. Check the option Preview Report Check box and the click on Finish Button.
Figure 18-4 Figure 4 shows the finished report, Open in Report Designer
Figure 4: Shows Report created by Report Wizard and shows the main features of Report Designer.
The Datasets window shows the Data that is available to the report.
- The main design window lets you view the report itself. You can see a preview of the report, work with the report in a layout designer, or work with the query that returns the data for the report.
- The Solution Explorer, Output and Properties windows are Standard Visual Studio windows.
Modifying a Report
Now that you have created a report with Report Wizard, you can modify it with Report Designer and If you have used sort of Visual report design tool in the past then you should have no issues in making changes here and the possibilities could be:- You can change the available Data or the sort order for the report by modifying the query on the Data tab.
- You can resize or rearrange controls on the layout tab.
- You can use the Properties window to change properties of Individual controls including their font, alignment, colors and so on.
In Order to Modify the report you just created, please follow these steps.
- Click on the Data tab to view the query for the report.
- Select a Descending sort type for the ListPrice Column and then Click the layout tab.
- Now Click in the text box at the top of the report, where the report name is displayed.
- Use the Properties window to change the Value Property of this control to Products by Color and then Click on the header for the Product Column.
- Place the cursor between the Name and Product Number columns to display a double-header arrow. Hold down the mouse button and drag the cursor to the right to widen the name column.
- Place the cursor between the Product Number and ListPrice columns to display a double headed arrow. Hold down the mouse button and drag the cursor to the right to widen the Product Number column.
- Click on the Preview tab to view the modified report, as shown in Figure 5
Figure 5: Modified Product Report
You can also use Report Designer to build your own reports starting from scratch. In general, you will follow these steps to create a report:
- Create a Report Project in Business Intelligence Design Studio.
- Associate one or more Datasets with the report.
- Create a query from Dataset.
- Build the report layout.
To Create a fresh report in Report Designer, follow these steps:
- Select->Close Solution to close the existing report.
- Select->New->Project.
- Select the Business Intelligence Projects Project Project type.
- Select the Report Server Project template.
- Name the new Report ProductReport2 and Pick a convenient location to save it in.
- Right-Click on report ProductReport2 and pick a convenient location to save it in.
- Select the Report template and Name the new report ProductReport2.rdl and Click Add.
- Select the Data tab in the Report Designer.
- Click the Datasets dropdown and select to open the Data source dialog box.
- Name the new Data source AdventureWorksDS and then Click on Edit button.
- Now, Connect to your test server and choose the AdventureWorks Database and Click on OK.
- Click on OK again to create the data source.
- Click the Query Designer toolbar button inside the Data tab to display the full query designer user interface.
- Click the Add Table button.
- Select the location table and Click on Add and then Click on Close.
- Check the boxes for the Name and Cost Rate Columns.
- Sort the Dataset in ascending order by Name.
- Click the layout tab to show the blank report layout.
- Hover your mouse over the toolbox tab to display the available controls for the report.
- Double Click the List control.
- Expand the List Control to the width of the report.
- Expand the Dataset in the Datasets window to show the column names.
- Drag the Name and Cost Rate Columns from the Datasets window and drop them in the List Control. Expand them horizontally untill each takes up about half of the List control. Figure 6 shows the report in layout view.
- Select the Preview tab to see the report with Data.
Figure 6: Designing a report from scratch
SSRS :Publishing a Report
Creating reports in Business Intelligence Development Studio is good for developers, but it does not help users at all. In order for the reports you build to be available to others, you must publish them to your Reporting Services Server. To publish a report, you can use the Build and Deploy menu items in Buisness Intelligence Development Studio. Well, before you do this you need to check the Projects configuration to make sure that you have selected and appropriate server for the deployment.
To Publish a report , please follow these steps.
- Close the ProductReport2 Project.
- Open the ProductReport1 Project, Select Project->ProductReport1 Properties.
- Click on the Configuration Manager Button.
- Set the Active Solution Configuration to Production, Make sure the Configuration is set to Production and both the Build and deploy Checkboxes are checked.
- Figure 7 Shows the Configuration Manager.
Figure 7: Setting the active Configuration.
7. Fill in the URL for your Report Server. If you are developing on the same computer where Reporting Services is installed and you installed in the default configuration, this will be http://localhost/ReportServer. Figure 18-8 8 shows the completed Property Pages.
Figure 8 Setting Report Project Properties
9. Select Build->Deply ProductReport1. The Output Window will trak the progress
of BIDS in deploying your report , as shown in Figure 18-9 9. Depending on the
speed of your computer, building the report may take some time.
Figure 9 Deploying a Report.
11. Click the Connect Button in Object Explorer and Select Reporting Services.
12. Now, Connect to your test server.
13. Expand the Home node in the Object Explorer tree to find the ProductReport1 Project.
14. Expand the ProductReport1 Project to find the ProductReport1 Report.
15. Right-Click on the report and select View Report.
browser.
SSRS: Using Report Build
Report Designer gives you one way to create reports for Reporting Services, but it is not the only way to do so, SQL Server 2005 also includes a tool directed at end users names Report Builder. Unlike Report Designer, which is aimed at Developers, Report Builder presents a simplified view of the report-buidling process and is intended for buisness analysts and othe end users.
Buildinf a Data Model
Report Builder does not let end users explore all of a SQL Server Database. Instead, it depends on a data model: a preselected group of tables and relationships that a developer has identified as suitable for end-user reporting. To build a data model, you use Business Intelligence Development studio. Data Models Contain three things:
- Data Sources Connect the Data model to actual data.
- Data Source Views Draw Data from Data sources.
- Report Models Contain entities that end users can use on reports.
To Create a Data Model, Follow these steps:
- If it is not already open, launch Business Intelligence Development Studio.
- Select File->New->Project.
- Select the Business Intelligence Projects Project type.
- Select the Report Model Project Template.
- Name the new Project AWSales and Save it in a convenient location and Click OK.
- Right-Click on Data sources in Solution Explorer and Select Add New Data Source.
- Read the first page of the Add New Data Source Wizard and Click Next and then Click on New.
- In the Connection Manager Dialog box Connect to the AdventureWorks Database on your test server and Click OK and the Click on Next.
- Name the new Data source AdventureWorks and Click on Finish.
- Right Click on Data source Views in Solution Explorer and Select Add New Data Source View.
- Read the first page of the Add New Data source View Wizard and Click Next.
- Select the AdventureWorks Data Source and click Next.
- Select the Production.Product Table and Click the >Button to move it to the included Objects listbox.
- Select the Sales.SalesOrderDetail table and Click the > button to move it to the included Object listbox.
- Select the Sales.SalesOrderDetail table and Click the > button to move it to the Included Objects Listbox.
- Select the Sales.SalesOrderDetail table and Click the > button to move it to the included Objects listbox.
- Click the Add Related Tables button.
- Click on Next and then Click on Finish.
- Right- Click on Report Models in Solution explorer and Select Add New Report Model.
- Read the first page of the Report Model Wizard and Click Next.
- Select the Adventure works Data source view and Click Next.
- Keep the default rules selection, as show in Figure 10 and Click on Next.
Figure 10: Creating Entries for end-user reporting.
24 . Click Run to Complete the wizard.
25 . Click Finish, if you get a warning that a file was modified outside the source
editor then Click YES.
26 . Select Build and Deploy AWSales to Deploy the report model to the local
Reporting Services Server.
Building a Report
Report Builder itself is a ClickOnce Windows Forms application. That means that end users install it from the browser, but once installed it is not a browser-based application. To get started with Report Builder, Browse to your Reporting Services Home page. Typically this will have a URL such as http://Server Name/Reports(or http://localhost/Reports If you are running the browser on the same box with SQL Server 2005 itself) Figure 11 shows the Reporting services home page
Figure 11: Reporting Services Home Page
Lets try it out
- Open a browser window and navigate to http://localhost/Reports( or to the appropriate Report Server URL if you are not working on the report server).
- Click the Report Builder Link.
- Depending on your operating System, you may have to confirm that you want to run the application.
- After Report Builder is installed, Select the AdventureWorks report model and the table report layout. Click OK. Figure 12 shows the new blank report that Report Builder will create
Figure 12: New Report in Report Builder
5. Select the Product Table.
6. Drag the Name field and drop it in the area labeled Drag and Drop Column fields.
7. Click on Special Offer Products in the Explorer window to show related child tables.
8. Click on Sales Order Details.
9. Drag the Total Order QTY field and drop it to the right of the Name field.
10. Click Where it says Click to Add Title and type Product Sales.
11. Click the RUN Report button to Produce the report shown in Figure 13
Figure 13: Report in Report Builder
13 . Select to sort by Total Order QTY Descending and then Click OK.
14 . Select File-> Save and then Name the New Report Product Sales.
15 . Click Save. This will publish the report back to Reporting Services server that you
Originally downloaded Report Builder form.
SSRS: Using Report Manager
The Web Home page for Reporting Services Provides a complete interface for managing reports (as well as other objects such as Data sources and models) after they are created. This interface, Knows as Report Manager is intended primarily for database administrators but as a developer you should know about its capabilities for managing and modifying reports.
When you click on a Report in Report Manager, you will see the reports Data as shown in Figure 14.
Figure 14: Report in Report Manager
- View allows you to see the current Data in the report.
- Properties lets you adjust such things as the reports Name, Data Source, Security Credentials, Caching and End user Security.
- History shows you saved snapshots of the report.
- Subscriptions lets you create subscriptions to the report. Subscriptions allow you to set up periodic delivery of reports to end users by e-mail or file share.
Exercises
Use Report Builder to create a report from the AdventureWorks Data Model showing the minimum and maximum order quantity for orders taken by each sales person in the company. You will find the necessary data in the SalesOrderHeader and SalesOrderDetail tables
Solutions to Exercises
- Open Browser window and navigate to http://Localhost/Reports( or to the appropriate Report Server URL if you are not working on the report server).
- Click the Report Builder link.
- Select the AdventureWorks report model and the table report layout and then Click OK.
- Select the SalesOrder header table.
- Drag the SalesPersonID field and drop it in the area labeled Drag and drop Column Fields.
- Click on Sales Order Details in the Explorer window.
- Expand the Total Order Qty Field in the Fields window to show the alternative fields beneath it.
- Drag the Min Order QTY field and drop it to the right of the Name field.
- Drag the Max Order QTY field and Drop it to the right of the Min Order QTY Field.
- Click Where it says Click to Add Title and type Sales Performance.
- Click the Run Report Button to Produce the Report shown in Figure 15













No comments:
Post a Comment