Intersoft ClientUI Documentation
Walkthrough: Configuring SqlReportViewer for First Time Use

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

In this walkthrough, you will perform the following tasks:

Prerequisites

You need the following components to complete this walkthrough:

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.
    View
    Copy Code
    <?xml version="1.0" encoding="utf-8"?>
    <Configuration>
            ...
            <Extensions>
                    ...
                    <Render>
                            ...
                            <Extension Name="Intersoft_XAML" Visible="false" 
    Type="Intersoft.ReportingServices.Rendering.XamlRenderer,Intersoft.ReportingServices.XamlRendering" />
                    </Render>
                    ...
            </Extensions>
            ...
    </Configuration>
                    

    The Name attribute correspond to the RenderingExtensionName property in the SqlReportViewer, which by default is set to Intersoft_XAML.
  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
    View
    Copy Code
    <configuration>
        <mscorlib>
            <security>
                <policy>
                    <PolicyLevel version="1">
                                    ...
                                            <CodeGroup ...>
                                                    <IMembershipCondition ... />
                                                    <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="CustomRendererGroup" Description="Code group for my data processing extension">
                                                            <IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin\Intersoft.ReportingServices.XamlRendering.dll"/>
                                                    </CodeGroup>
                                                    ...
                                            </CodeGroup>
                                    </PolicyLevel>
                            </policy>
                    </security>
            </mscorlib>
    </configuration>

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
    View
    Copy Code
    <add verb="*" path="ReportDocumentStreamer.ashx" type="Intersoft.SqlReportViewer.Server.SqlReportViewerHandler, Intersoft.SqlReportViewer.Server"/>

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
    Copy Code
    <bindings>
      <basicHttpBinding>
            <binding name="ReportingService2010Soap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
              <security mode="TransportCredentialOnly">
                    <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
                    <message clientCredentialType="UserName" algorithmSuite="Default"/>
              </security>
            </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://intersoft-test:80/ReportServer/ReportService2010.asmx" binding="basicHttpBinding" bindingConfiguration="ReportingService2010Soap" contract="rs2010.ReportingService2010Soap" name="ReportingService2010Soap"/>
    </client>
  3. Add a new endpoint and binding for SQL report execution service. The endpoint name must be set to ReportExecutionServiceSoap.
    View
    Copy Code
    <bindings>
      <basicHttpBinding>
            <binding name="ReportExecutionServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="6553600" maxBufferPoolSize="52428800" maxReceivedMessageSize="6553600" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="819200" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
              <security mode="TransportCredentialOnly">
                    <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
                    <message clientCredentialType="UserName" algorithmSuite="Default"/>
              </security>
            </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://intersoft-test:80/ReportServer/ReportExecution2005.asmx" binding="basicHttpBinding" bindingConfiguration="ReportExecutionServiceSoap" contract="rsExecService.ReportExecutionServiceSoap" name="ReportExecutionServiceSoap"/>
    </client>>

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
Copy Code
<Intersoft:SqlReportViewer
    ReportProxyHandler="http://localhost:7373/ReportDocumentStreamer.ashx"
    ReportServer="http://intersoft-test/ReportServer"
    ReportExecutionServicePage="ReportExecution2005.asmx"
    ReportServicePage="ReportService2010.asmx"
    RenderingExtensionName="Chart_Intersoft_XAML">
</Intersoft:SqlReportViewer>
See Also

Concepts