AsynchronousRender Sample Windows Application


Updated: 5 December 2005
AsynchronousRender is a sample Windows application developed using Visual Studio 2005. 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 view the contents of a local report server, to select a report, and then to render that report to disk using asynchronous server communication. 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:
These samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples.



Requirements

You should be familiar with Visual Studio and one or more of the .NET Framework programming languages, and you should have installed the following to use the AsynchronousRender sample:
  • Microsoft Visual Studio 2005 or compatible development environment (for viewing the project files).
  • Microsoft .NET Framework version 2.0.
  • SQL Server 2005, including Reporting Services.
  • 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.

Location

This sample is located in the Application Samples\AsynchronousRender Sample subdirectory of the Reporting Services samples directory.
For example:
C:\Program Files\Microsoft SQL Server\90\Samples
\Reporting Services\Application Samples\AsynchronousRender 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 2005, 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\90\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 AsynchronousRender sample within Visual Studio
  1. Open the solution (AsynchronousRenderCS.sln or AsynchronousRenderVB.sln).
  2. From the Debug menu, click Start Without Debugging.
  3. To exit the application, click Exit.
To build and run the AsynchronousRender sample from the Command Line
  1. Use the Change Directory command to change to the AsynchronousRender directory.
  2. Type the following to build both the C# and Visual Basic versions of the sample, modifying the .NET Framework path as appropriate. For example: * for /r %f in (*.sln) do C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\msbuild.exe "%f" *
  3. In the application's \Bin\Debug directory, double-click AsynchronousRender.exe to start the application.
  4. To exit the application, click Exit.

Using the Sample

After building and running the AsynchronousRender sample application, you can use the sample to browse for and render reports in your report server database. By default, the application attempts to connect to an instance of the Report Server Web Service located on the same computer running AsynchronousRender.

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 AnynchronousRender sample application
  1. Use the Connect button to make a connection to the local report server and retrieve a list of items in the report server namespace.
  2. Select a report using the TreeView control.
  3. When a report is selected, you can render the report to Web archive (MHTML) asynchronously. To render the report, click Render.An execution timer runs while the application waits for a response from the server. When the report is rendered and ready, a message box appears. To save the report to disk, click Yes.
  4. Choose a location and type a name for the report, and then click Save.
  5. To exit the application, click Exit.

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.


© 2007 Microsoft Corporation. All rights reserved.

Last edited Nov 6, 2008 at 10:09 PM by bonniefe, version 18

Comments

No comments yet.