Skip to end of metadata
Go to start of metadata

This walkthrough shows the steps to configure SqlReportViewer control for the first time usage.

Prerequisites

You need the following components to complete this walkthrough:

  • SQL Reporting Service 2008 Standard or Enterprise Edition 
  • Visual Studio 2010
  • Silverlight 4 Tools for Visual Studio 2010
  • Intersoft ClientUI 6 or higher 

On this page:

Registering Rendering Engine

This section shows how to register SqlReportViewer rendering engine in SQL Reporting Service. The rendering engine will translate the SQL report to a XAML page. By default, Intersoft ClientUI installer has automatically register the SqlReportViewer rendering engine.

To register rendering engine in SQL Reporting Service

  1. Copy the rendering engine assembly, Intersoft.ReportingServices.XamlRendering.dll, to SQL Reporting Service installation bin folder.
    By default SQL Reporting Service installation folder is located in C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer.
  2. Locate the rsreportserver.config in your SQL Reporting Service installation folder.
  3. Add a new Extension entry in Configuration/Extensions/Render
    The Name attribute correspond to the RenderingExtensionName property in the SqlReportViewer, which by default is set to Intersoft_XAML.

    View
  4. Register the rendering engine as a safe assembly by adding a new CodeGroup entry in the rssrvpolicy.config. The CodeGroup entry is added in in configuration/mscorlib/security/policy/PolicyLevel/CodeGroup

    XAML

Registering Proxy Handler

This section shows how to register SqlReportViewer proxy handler in the web project. The proxy handler is used to buffer the XAML results in streaming loading mode and compress the stream to be delivered to the Silverlight client, which will be further processed by the SqlReportViewer control.

To register SqlReportViewer proxy handler in web project

  1. Open the Web.config in the Silverlight web project.
  2. Add a new entry for SqlReportViewer proxy in httpHandler node under configuration/system.web

    XAML

Registering SQL Reporting Service Web Service

This section shows how to register SQL Reporting Service web service in the web project. The web service is used by the proxy handler to communicate with the SQL Reporting Services.

To Register rendering engine in SQL Reporting Service

  1. Open the Web.config in the Silverlight web project.
  2. Add a new endpoint and binding for SQL report service. The endpoint name must be set to ReportingService2010Soap

    View
  3. Add a new endpoint and binding for SQL report execution service. The endpoint name must be set to ReportExecutionServiceSoap.

    View

Setting SqlReportViewer Proxy and Web Service

This section shows how to set the most minimum configuration to successfully implement the SqlReportViewer control.

To set SqlReportViewer proxy and web service

  1. Set the ReportProxyHandler to proxy handler set in the web project configuration.
  2. Set the SQL reporting service web service execution service page and service page in the ReportExecutionServicePage and ReportServicePage property, by default the value is ReportExecution2005.asmx and ReportService2010.asmx respectively.
  3. Set the ReportServer property which point to the reporting service server URL.
  4. Set the registered rendering engine extension name in the RenderingExtensionName property. By default the value is set to Intersoft_XAML.
  5. Optionally, if the report contains image, you will need to create a virtual folder to host the image in SqlReportViewer. The virtual folder is set in ImageVirtualPath property and by default the virtual folder is set to /TempImages.
View