Deploying and Consuming a SQL Server 2008 Report from a SharePoint 2007 site
October 9th, 2008 by ebellaIn this post you will learn how to deploy a report from a SQL Server 2008 Business Intelligence Development Studio Report Server Project into a SharePoint 2007 site (Integrated with Reporting Services). Once the report is deployed, you will be able to consume it directly from a page of your SP site using a built-in web part that comes with the Microsoft SQL Server 2008 Reporting Services Add-in.
If you are still stuck in the part where you integrate Reporting Services with SharePoint 2007, you might be interested on reading my previous post Integrating SQL Server 2008 Reporting Services with SharePoint 2007.
Deploy your report from Visual Studio into your SharePoint site
This task assumes that you have already designed a report in SQL Server Business Intelligence Development Studio (Visual Studio), and you are willing to publish it into your site’s Report Gallery. In this task you will learn how to configure the report deployment settings in order to point them to the correct SharePoint URLs. For more information, see How to: Publish a Report to a SharePoint Library from Report Designer (SharePoint Integrated Mode).
1. In Solution Explorer, right-click the Report Server project, and select Properties.
2. In your report project Property Pages, edit the following fields, and click OK. (For more information on this, see Deploying Models and Shared Data Sources to a SharePoint Site):
TargetDataSourceFolder: Is the URL of your SharePoint library for shared data sources. For example: http://<siteurl>/Documents
TargetReportFolder: Is the URL of your SharePoint site for Reports. For Example: http://<siteurl>/ReportsLibrary
TargetServerURL: Is the URL of your SharePoint site to which the project is deployed. For Example: http://<siteurl>
3. Right-click the report that you wish to publish, and click Deploy.
If everything goes fine, the output should look like this:
4. Go to the Reports Library of your site, and check that the Report was successfully deployed.
Enable the Report Viewer Web Part in SharePoint
In this task you will add the Report Viewer Web Part to your site’s Web Part Gallery. Once the web part is uploaded into the Gallery, you will be able to use it from any page of your SharePoint site. Before adding it check if the Report Viewer Web Part isn’t already in your Gallery; in this case you can skip this step.
1. Navigate to the Site Settings page of the site where you wish to consume the report. To do this, click Site Actions | Site Settings | Modify All Site Settings.
2. In the Galleries section, click Web Part link.
3. Upload the Report Viewer Web Part (installed by the Add-In Microsoft SQL Server 2008 Reporting Services Add-in for Microsoft SharePoint Technologies) to the site’s Web Part Gallery. To do this, click Upload | Upload Document.
4. Click Browse, point to “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\FEATURES\ReportServer\ReportViewer.dwp”, and click OK.
5. In the Web Part Gallery Edit Item page, accept default values by clicking OK. The Web Part should now be visible in the Web Part Gallery list.
Consume the report from a Page in your SharePoint Site.
This page will contain the built-in web part that will consume the Report. For more information, see
1. Create a new page in your SharePoint site. To do this, click Site Actions | Create Page.
2. Configure the new Page Title and URL, and select the template that supports web parts named (Welcome Page) Blank Web Part Page. Then click Create.
3. Click Add a Web Part in any of the allowed slots.
4. In All Web Parts, in the Miscellaneous section, select SQL Server Reporting Services Report Viewer, and click Add.
5. Edit the properties of the report in the tool pane:
6. Assign the Report target URL. To determine the URL for any report, right-click the report in the Reports Library, and select Copy Shortcut. Then paste the URL in the Report field (replace the "%20" URL encoding with a space), and click OK.
You should now see the report automatically generated in your page:
Next, you should publish the page and browse it to see the report finally working!!:)
References:
Publishing Reports from Report Server in Sharepoint Integrated Mode throws error - TechNet Forums
How to: Publish a Report to a SharePoint Library from Report Designer (SharePoint Integrated Mode)