FindRenderSave Sample Windows Application
FindRenderSave is a sample Microsoft Windows application developed 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 Report Server Web service. The sample uses the SOAP API to enable you to search for reports in the report server database, to review the report properties and to render the reports to various on-disk formats. 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 Microsoft Visual Studio and either Microsoft Visual C# or Microsoft Visual Basic, and your system must meet the following requirements to use the FindRenderSave sample:
- Visual Studio 2005 or compatible development environment (for viewing the project files).
- 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. The sample assumes that you have SQL Server 2005 Reporting Services installed on your development computer.
Location
This sample is located in the Application Samples\FindRenderSave Sample subdirectory of the Reporting Services samples directory.
For example:
C:\Program Files\Microsoft SQL Server\90\Samples\Reporting Services\Application Samples\FindRenderSave 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
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.
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.
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 FindRenderSave sample within Visual Studio
Open the solution (FindRenderSaveCS.sln or FindRenderSaveVB.sln).
From the Debug menu, click Start Without Debugging.
To exit the application, click Close.
To build and run the FindRenderSave sample from the Command Line
Use the Change Directory command (CD) to change to the \FindRenderSave directory.
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.
In the application's \Bin\Debug directory, double-click FindRenderSave.exe to start the application.
Click Close, to close the application.
Using FindRenderSave
After installing the FindRenderSave sample application, you can use the sample to search for reports, view report properties, and render reports to various on-disk formats. By default, the application attempts to connect to an instance of the Report Server Web service located on the same computer running FindRenderSave.
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 use the FindRenderSave sample application
Open FindRenderSave.sln in Visual Studio.
On the Debug menu, click Start to run the sample application.
Use the Search by list to search for reports by name, by description, or by both name and description.
Enter the text that you want to use in your search in the Search string box. When you have finished entering your search string, click Search.
A list of reports that match the search criteria appears in the Items found list.
Click on any report in the Items found list to view the description and path properties.
When a report is selected, you can render the report to one of four render formats: Excel, Image, Web archive (MHTML), or PDF. To select a render format, use the Render as list.
To save the report, click Save Report.
The Save As dialog box opens.
Note
FindRenderSave will not render or save reports requiring credentials or parameterized reports that do not have default values specified for all parameters.
Choose a location and type a name for the report, and then click Save.
To exit the application, click Close.
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 |
|