Sunday, 30 October 2011

Report Deployment on Report Server

Once the report has been made, next we need to deploy that on the report server. To do so, we need to know the report server name. From the Configuration Tools, we need to choose the Reporting Services Configuration Manager
22.jpg
The Reporting Services Configuration Manager window opens up as shown under
23.jpg
Click on the Connect button and we will be presented with the below screen
24.jpg
I have deliberately highlighted the Reporting Server Database Name (which is ReportServer$NILADRIDENALI). We will see something about it within a short while. Let us click on the Report Manager URL tab in order to get the Report Server URL.
25.jpg
Click on the URL and we will be asked to enter the Windows credentials
26.jpg
Once entered, click on the OK button and we will get a screen as the below
27.jpg
At this point of time let us query the Catalog table of ReportServer$NILADRIDENALI database
 Select * from dbo.Catalog 
and the result is as under
28.jpg
We have done this because when we design a report, Report Definition Language File (rdl) gets generated. It is basically a XML document file that contains all the information about how we design our report. As soon as we deploy the report, the rdl file gets inserted into the Report Server Database. We can query the catalog table to get the information about the same. We will look into that part shortly. But at present, our report is absent in this database.
Now let us come back to our SSRS project. Let us right click on the BasicSSRSReport_Part1 project's properties menu.
29.jpg
Alternatively, we can do the same by choosing the Properties menu from the Projects tab
30.jpg
In either of the case, we will be directed to the properties page where we will enter the Target Server URL obtained from the Report Manager URL of the Reporting Services Configuration Manager.
31.jpg
After we click on the OK button , lets choose the project, right click and click on the Deploy from the available context menu.
32.jpg
If everything goes fine, we will receive a success message
33.jpg
At this point if we query our Catalog table by using the same query as described above, we will receive the below output
34.jpg
So our report has been inserted into the Report Server Database. We can also figure out that, the rdl content has been inserted into the Content column (whose type is image) of the Catalog table. We can obtain the XML content from this hexadecimal representation and then use XQuery to get more information about the reports. To get the XML content, we can issue the below query
Select
 [Report Name] = Name,
 [Rdl Content] = CAST(CAST(Content As Varbinary(Max)) As XML) 
From Catalog
Where Type = 2
The output being as under
35.jpg
Now let us visit our report from the browser. Click the URL available in the Report Manager URL and we will get the below
36.jpg
Now Click on the BasicSSRS_Report_Part1 and it will show the list of available report (in this case only one though i.e. Player Rport).
37.jpg
Click on the Player Report and we will get the Player Report as shown under
38.jpg

No comments:

Post a Comment

SSIS: Creating Package Configurations

This post discusses the creation of Configuration Files and how they can be useful while migrating a package from one environment to an...