Compartilhar via


RSExplorer Sample Application

RSExplorer is a sample Microsoft Windows application developed in Microsoft Visual C# using Microsoft Visual Studio. The application is based on a real-world scenario, and it demonstrates how to develop a Windows application that uses the Reporting Services Web service. RSExplorer uses a Microsoft .NET Framework proxy class to call Web service methods exposed by the Reporting Services SOAP API. It also highlights new features in the area of enterprise reporting. This sample is not supported on Itanium-based operating systems.

The SQL Server samples are not installed automatically during setup. For instructions about how to install the samples, see Installing Samples.

Important

Sample applications should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator.

Requirements

You should be familiar with Visual Studio and Visual Basic or C#, and you should have installed the following to use the RSExplorer sample:

  • Microsoft Visual Studio 2005 or compatible development environment (for viewing the project files).
  • SQL Server 2005, including Reporting Services.
  • Microsoft .NET Framework version 2.0.
  • Reporting Services samples. You can choose to install the samples during SQL Server 2005 setup. For this release, when you choose to install samples, a separate installer is installed on your computer that you can launch to extract and install samples. You can run this installer from the Start menu in the Microsoft SQL Server 2005 program group.
  • A report server that you have permission to access on your network, if you plan to use the sample client application to view the contents of a report server and render reports.

Note

RSExplorer may be converted to compile and run in previous versions of Visual Studio. However, it is designed specifically to be compatible with the version mentioned in this section.

Location

This sample is located in the Application Samples\RSExplorer Sample subdirectory of the Reporting Services samples directory.

For example:

C:\Program Files\Microsoft SQL Server\90\Samples\Reporting Services\Application Samples\RSExplorer Sample

Building the Sample

If you have not already created a strong name key file, generate the key file using the following instructions.

To generate a strong name key file

  1. Open a Microsoft Visual Studio 2005 command prompt. Click Start, point to All Programs, point to Microsoft .NET Framework SDK 2.0, and then click SDK Command Prompt.

    -- or --

    Open a Microsoft .NET Framework command prompt. Click Start, point to All Programs, point to Microsoft .NET Framework SDK 2.0, and then click SDK Command Prompt.

  2. Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed.

    Note

    To determine the folder where samples are located, click the Start button, point to All Programs, point to Microsoft SQL Server, point to Documentation and Tutorials, and then click Samples Directory. If the default installation location was used, the samples are located in <system_drive>:\Program Files\Microsoft SQL Server\100\Samples.

  3. At the command prompt, run the following command to generate the key file:

    sn -k SampleKey.snk

    Important

    For more information about the strong-name key pair, see "Security Briefs: Strong Names and Security in the .NET Framework" in the .NET Development Center on MSDN.

To build and run the RSExplorer sample within Visual Studio

  1. Open the solution (RSExplorerCS.sln or RSExplorerVB.sln).

  2. From the Debug menu, click Start Without Debugging.

  3. To exit the application, choose File and then Exit.

To build and run the RSExplorer sample from the Command Line

  1. Use the Change Directory command to change to the RSExplorer directory.

  2. Type the following to build both the C# and Visual Basic versions of the sample:

    for /r %f in (*.sln) do C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\msbuild.exe "%f"
    

    Note

    The Windows system path and .NET Framework version number may differ on your system.

  3. In the application's \Bin\Debug directory, double-click RSExplorer.exe to start the application.

  4. From the File menu, choose Exit to close the application.

Using RSExplorer

After installing the RSExplorer sample application, you can use the sample to view the contents of a report server, add new folders, import reports, edit item properties, and view reports.

Important

Sample applications should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator.

To start the RSExplorer sample application

  1. Open RSExplorer.sln in Visual Studio.

  2. On the Debug menu, click Start to run the sample application.

  3. In the Server Address box, enter the virtual root of the report server you want to access for example, http://<localhost>/reportserver, and then click Go.

    A detailed list of report server items should appear in the Catalog Explorer list view.

  4. Navigate the report server database tree by clicking on folders. You can navigate back by clicking the Up arrow on the toolbar.

  5. Click on any report in the list and click the Show Properties link to view the description and path properties.

To add a folder to the report server database

  1. Navigate to a location in the tree to which you want to add a new folder.

  2. On the File menu, click New, and then click Folder.

    The Add Folder dialog box opens.

  3. Choose a name and description for the folder, and then click Add.

To import a report

  1. On the File menu, click Import Report.

    The Import Report File dialog box opens.

  2. Use the dialog box to browse for a Report Definition Language (RDL) file that you want to upload to your report server, and then click Open.

To delete an item from the report server database

  1. Browse to and select an item that you want to delete in the Catalog Explorer list.

  2. On the Edit menu, click Delete. Click Yes to confirm the action.

To copy items in the report server database

  1. Select the item that you want to copy.

    RSExplorer is limited to copying reports, resources, and data sources.

  2. On the Edit menu, click Copy.

  3. Browse to a folder into which you want to copy the selected item or items, and then, on the Edit menu, click Paste.

To view the properties of a selected item

  1. Select an item in the Catalog Explorer list.

  2. Click the Show Properties link above the right window pane.

    The properties are displayed.

See Also

Tasks

Compiling and Running Code Examples
SQL Server Reporting Services Samples

Other Resources

Application Samples (Reporting Services)

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

5 December 2005

Changed content:
  • Changed instructions for generating a key file, including the name and location of the key file.