Documente Academic
Documente Profesional
Documente Cultură
Sql Server Reporting Service is used to generate reports by taking input either from OLTP
database or OLAP Database.
To retrieve information from OLTP database we can Write SQL Query and to get the data
from OLAP cube we have to write MDX query.
Types of Reports:
Tabular Reports
Matrix Reports
List Reports
Chart Reports
The following are the other type of reports that can be designed by the help of tabular /
matrix report
DrillDown Report
DrillThrough Report
SubReport
Once we open any Report Server project we will find the following items in the solution explorer
Shared DataSets
Reports
Shared Data Sources contains list of datasources that are accessible to any report in the project.
Shared DataSets are the resultsets that are available for are the reports in the project
2. In the window displayed click next button and follow these steps
9. Right click on “DataSources” in “Report Data” window and select “Add DataSource” option.
10. In the window Displayed choose “Use shared data source reference” and select “dsAW”.
11. Right click on “DataSets” in “Report Data” window and select “Add Dataset” option
12. In the window displayed choose “Use a dataset embedded in my report” option.
13. Choose datasource as “datasource1”
14. Choose “QueryType” as “Text”
15. Write the following query
SELECT DimProduct.EnglishProductName, DimProduct.Color, DimProduct.Class,
FactInternetSales.SalesAmount, FactInternetSales.TaxAmt
FROM DimProduct INNER JOIN
FactInternetSales ON DimProduct.ProductKey = FactInternetSales.ProductKey
16. Open the “ToolBox” window , Drag and drop a “Table” control on to the designer
17. Open “Report Data” Window, Drag and drop members from dataset on to the table
Using Expressions:
Expressions will be used in different scenarios to provide customized result.
In the previous report we will get output in plain report format.
In order to display the report output in the following way use expressions for background
color of the records to be displayed.
1. In the design tab select column header and set the background color property
2. Select the row properties window.
3. Click the drop down button of backcolor and choose expression link
18. Open “Report Data” Window, Drag and drop class,color,English product name from
dataset on to the table rows. SalesAmount, TaxAmount into Data.
19. Right click Sales Amount Cell and choose “Split Cells” Option.
Using Parameters :
The “Parameters” section in the Report Data window is used to configure parameters with
static values or values from a dataset. Based on these values we can pass parameters to the SQL
Statement or Procedre.
Creating a Parameter With Static Values :
1. In the report data window, right click on ‘Parameters’ and choose ‘Add Parameter’ option
2. In the window displayed specify Name and Prompt values .
7. Click privew and observe the filter at the top of the screen
8. Choose a color and click on ‘View Report’ button.