Friday, December 23, 2011

Deploying SSRS 2008 Reports to SharePoint 2010 sites in Integration mode

 

Scenario: We have SSRS 2008 R2 configured for SharePoint 2010 Integration mode.

Requirement: We as a BI Developer, need to develop and deploy the reports to the SharePoint sites.

Walkthrough:

Step 1: Fire up BIDS – New Project – Select “Report Server Project” from the templates – Name the project “MyFirstReport” – Click OK.

Step 2: Let’s create the Shared DataSource. Right click the [Shared DataSources] in Solution Explorer and click “Add New DataSource” – Fill the [General] Section with the Name=”DataSource1”, Type=”Microsoft SQL Server” and edit the ConnectionString. We’ll select “Use Windows Auth” to connect to our DB for this example (This may vary based upon your Authentication mechanism).

Leave the [Credentials] Section with “Windows Auth” selected. Click Okay and you should see the DataSource1.rds created in the Solution Explorer.

Step 3: Now let’s create a report. Right click the [Reports] in Solution Explorer and click “Add New Report” – Go through the Report Wizard using the DataSource1.rds that we created earlier – Build your query by adding the appropriate tables – Select your Report Type (Table/Matrix, I’ll select Table) – Design your Table (I added all fields to the Details section) – Choose Table Style (Corporate) – Finish the wizard by naming the report “Report1”. You should see the Report1.rdl in the Solution Explorer.

Step 4: At this point, you can build the report and switch to the preview tab to view the report.

Step 5: It’s time for deploying our reports. Quite simple, just right-click on the project and deploy (if you want all the datasources and reports to be deployed in one go, else you can deploy them individually). Okay, right-click and deploy, uh Oh ! what happened. This is not what we wanted to see.

image

Okay, we never provided the SP Site URLs. Also, we need to make sure and plan where will our Datasources and reports should be deployed on the site.

Step 6: So let’s create the Document Libraries, one for Datasource and another for Reports. Browse the SP site and create them now. I created the following: [DataSources] and [Reports] without the braces [ ].

Step 7: Now, let’s get back to our BIDS project. Right click on the project and choose Properties. There you are, if you see the values there, they are the default values for SSRS in Native Mode.

image

So we need to change them to comply with our needs. Modify them as shown here:

image

Ok now that looks better. Let’s try to deploy again. It should do just fine. Browse to the “Reports” library on the site and click on the

You should be able to see the report.

No comments: