How to register a data provider in C #

We have a middle tier that provides data. We are trying to write a custom data provider. I overtook the intefaces of the SYstem.Data namespace, for example IDbCommand, IdbConnection and generated a dll.

We wanted to register dll.So that it should be specified in the ssrs data source type window.

We can not register it. Can anyone help?

+1
source share
1 answer

Development setup

On your development machine, the DLL for your data extension must be installed in the Visual Studio directory. It will be something like this:

C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies 

In the same folder, you need to add the data extension to RSReportDesigner.config as follows: In the <Extensions> <Data> section, add the following line:

 <Extension Name="MyDataExtension" Type="My.Name.Space.MyDataExtensionClass"/> 

In the <Extensions> <Designer> section, add the following line:

 <Extension Name="MyDataExtension" Type="Microsoft.ReportingServices.QueryDesigners.VDTQueryDesigner,Microsoft.ReportingServices.QueryDesigners"/> 

You probably also need to add Full Trust for your data extension to work properly. Modify RSPreviewPolicy.config and add the following code security group:

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

Now you can use the data processing extension in Visual Studio.

Server Tuning

On the Reporting Services server, the data DLL must be installed in the SQL Server Reporting Services directory. It will be something like this:

 C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer\bin 

In the ReportServer main directory, located above the bin directory, you need to add the data extension to RSReportServer.config . In the <Extensions> <Data> section, add the following line:

 <Extension Name="MyDataExtension" Type="My.Name.Space.MyDataExtensionClass"/> 

To provide full DLL trust, edit RSSrvPolicy.config and add the following code security group:

 <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="MyDataExtensionCodeGroup" Description="Code group for my data processing extension"> <IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer\bin\MyDataExtension.dll" /> </CodeGroup> 
+3
source

Source: https://habr.com/ru/post/945906/


All Articles