Поделиться через


How to: Deploy a Data Processing Extension to Report Designer

Report Designer uses data processing extensions for retrieving and processing data while you are designing reports. You should deploy your data processing extension assembly to Report Designer as a private assembly. You also need to make an entry in the Report Designer configuration file, RSReportDesigner.config.

To deploy a data processing extension assembly

  1. Copy your assembly from your staging location to the Report Designer directory. The default location of the Report Designer directory is C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies.

  2. After the assembly file is copied, open the RSReportDesigner.config file. The RSReportDesigner.config file is also located in the Report Designer directory. You need to make an entry in the configuration file for your data processing extension assembly file. You can open the configuration file with Microsoft Visual Studio or with a simple text editor, such as Notepad.

  3. Locate the Data element in the RSReportDesigner.config file. An entry for your newly created data processing extension should be made in the following location:

    <Extensions>
       <Data>
          <Your extension configuration information goes here>
       </Data>
    </Extensions>
    
  4. Add an entry for your data processing extension which includes an Extension element with values for the Name, Type, and Visible attributes. Your entry might look like the following:

    <Extension Name="ExtensionName" Type="CompanyName.ExtensionName.MyConnectionClass, AssemblyName" />
    

    The value for Name is the unique name of the data processing extension. The value for Type is a comma-separated list that includes an entry for the fully qualified namespace of your class that implements the IExtension and IDbConnection interfaces, followed by the name of your assembly (not including the .dll file extension). By default, data processing extensions are visible. To hide an extension from user interfaces, such as Report Designer, add a Visible attribute to the Extension element, and set it to false.

  5. Finally, add a code group for your custom assembly that grants FullTrust permission for your extension. You do this by adding the code group to the rspreviewpolicy.config file located by default in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies. Your code group might look like the following:

    <CodeGroup class="UnionCodeGroup"
       version="1"
       PermissionSetName="FullTrust"
       Name="MyExtensionCodeGroup"
       Description="Code group for my data processing extension">
          <IMembershipCondition class="UrlMembershipCondition"
             version="1"
             Url="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\MyExtensionAssembly.dll"
           />
    </CodeGroup>
    

URL membership is only one of many membership conditions you might choose for your data processing extension. For more information about code access security in SQL Server 2005 Reporting Services (SSRS), see Understanding Code Access Security in Reporting Services.

Generic Query Designer

Report Designer provides a generic query designer that you can use with custom data processing extensions. This designer consists of two panes: a query pane and a results pane. You can use the generic designer to write queries that are not supported by the graphical interface. Unlike the graphical query designer, the generic query designer does not check query syntax or restructure the query.

To enable the generic query designer for a custom extension

  • Add the following entry to the RSReportDesigner.config file under the Designer element, replacing the Name attribute with the name that you provided in previous entries.

    <Extension Name="ExtensionName" Type="Microsoft.ReportingServices.QueryDesigners.GenericQueryDesigner,Microsoft.ReportingServices.QueryDesigners"/>
    

Verifying the Deployment

Before you can verify deployment, you must close all instances of Visual Studio on your local computer. After you have ended all current sessions, you can verify whether your data processing extension was deployed successfully to Report Designer by creating a new report project in Visual Studio. Your extension should be included in the list of available data source types when you create a new data set for your report.

См. также

Справочник

Deploying a Data Processing Extension
Reporting Services Extension Library

Другие ресурсы

Reporting Services Extensions
Implementing a Data Processing Extension

Справка и поддержка

Получение помощи по SQL Server 2005