Friday, April 04, 2008

Creating a WSS 3.0 Solution package from Reporting Services Web Part package

You can use Reporting Services SharePoint 2.0 Web Parts in WSS 2.0 and WSS 3.0 to access report server content on a SharePoint site from a native mode SQL Server 2005 report server or from a SQL Server 2000 Reporting Services report server.

There are two web parts as part of the Reporting Services Web Part. They are
  • Report Explorer – This allows you to connect to Report Manager on the report server computer. You can browse available reports on a report server and subscribe to individual reports.
  • Report Viewer – This allows you to display a report, it provides a toolbar that you can use to navigate pages, search for content, or export the report.
The Report Services (RS) Web Parts was introduced in SQL Server 2000 Reporting Services Service Pack 2 (SP2) and continue to be available in current releases of SQL Server. These Web Parts are provided as a Web Part package and is installed with SQL Server Reporting Services. You can install the RS Web Parts by running the STSADM.EXE using the following syntax (assuming you have installed the web parts in the default location)

STSADM.EXE -o addwppack -filename "C:\ Program Files\Microsoft SQL Server\90\Tools\Reporting Services\SharePoint\RSWebParts.cab" -globalinstall

For the web parts to work properly you have to install it on all the Web Front End (WFE) servers. This is a time consuming task if you have a large farm. Below, I will describe a step by step procedure to create a solution out of the web part package. I will use WSPBuilder, a SharePoint Solution Package creation tool for WSS 3.0 and MOSS 2007.

Steps to Create the Solution Package

1. Download the WSPBuilder application and extract to c:\WSPBuilder folder. Update the System “PATH” environment variable to include this directory.

2. Open the RSWebParts.cab using winzip.exe and extract the contents of the cab file to folder c:\RSWebPartsPkg. The contents of the cab file are shown in Figure 1.

Figure 1: RS Web part package cab file contents

3. Create a directory c:\RSWebParts and create the following structure as shown in Figure 2 under it.

Figure 2: Directory structure needed for WSPBuilder to create the solution package.

4. Copy the contents of directories de, es, fr, it, ja, ko, zh-chs and zh-cht from c:\ RSWebPartsPkg to c:\RSWebParts\80\resources directory.

5. Copy SPExplore.dwp and SPViewer.dwp files from c:\ RSWebPartsPkg to c:\RSWebParts\80\wpcatalog directory.

6. Copy report_explorer.gif and report_viewer.gif file from c:\ RSWebPartsPkg to c:\RSWebParts\80\wpresources\RSWebParts directory.

7. Copy RSWebParts.dll file from c:\ RSWebPartsPkg to c:\RSWebParts\GAC directory.

8. You need Microsoft.SharePoint.dll and Microsoft.SharePoint.Security.dll from WSS 2.0 version. Copy these dlls to c:\WSPBuilder\2003 directory. Without these files you will not be able to build the solution package.

9. Now open up a command prompt and change directory to c:\RSWebParts directory.

10. Execute the following command from the command prompt to create the solution package. See Figure 3.
WSPBuilder.exe -DllReferencePath c:\WSPBuilder\2003

Figure 3: Run WSPBuilder to create the RS Web Parts Solution Package

Installing the Solution Package

Following are the steps to install the RSWebParts solution package.

1. On the computer that has the installation of the WSS 3.0 or MOSS 2007, open a Command Prompt window and navigate to the folder C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN.

2. Add the RSWebParts.wsp solution the SharePoint farm using the following command
STSADM -o addsolution -filename RSWebParts.wsp

3. Next deploy the added solution using the following command
STSADM -o deploysolution -name RSWebParts.wsp -allcontenturls -immediate –allowgacdeployment

The Web Parts are now deployed on all the WFEs and are ready to be used.