Custom Data Providers in Default Report Designer
Data Dynamics Reports Support
Custom Data Providers in Default Report Designer
08-12-2010, 12:59 PM
Greetings,
I've created a Custom Data Provider, and it is working fine when I use it in the context of an end user designer form that I've created in Visual Studio. However, I want to use it with the Data Dynamics default report designer that comes installed with the Data Dynamics package.
I go to the C:\Program Files\Data Dynamics\Reports\1.6.1871.8\Assemblies directory where the Data Dynamics assemblies and executables are. I drop in the new assembly that contains my Custom Data Provider, and I change the DataDynamics.Reports.config file in the Assemblies directory to contain the reference to my new data provider like so:
This same config reference works to pull in the new provider when I'm running it in the end user designer that I built in Visual Studio.
I'm guessing this is just something quirky having to do with the execution directory not being the same as the physical filesystem directory, but I don't know where to put the assembly and the changed DataDynamics.Reports.config file to have my new provider show up.
-Jason
Re: Custom Data Providers in Default Report Designer
08-12-2010, 4:30 PM
Hi Jason,
When integrating with the Visual Studio designer there are a couple additional steps that need to be taken.
1) The custom data provider assembly needs to be in the GAC or the PrivateAssemblies directory under the Visual Studio installation directory, on my system for VS2008 that is here: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\
2) There is a separate configuration file that is used for Visual Studio that needs to be edited, it is located under C:\Program Files\Data Dynamics\Reports\\Visual Studio\DataDynamics.Reports.config
I hope that helps,
James
Re: Custom Data Providers in Default Report Designer
08-12-2010, 7:19 PM
Hi James, thanks for the reply, but it doesn't quite get at my issue.
My issue is that my custom data provider is not being picked up by the DataDynamics.Reports.Designer.exe that is in C:\Program Files\Data Dynamics\Reports\1.6.1871.8\Assemblies (the Report Designer that came installed with Data Dynamics). I'm having no trouble with getting my provider to work with the End User Report Designer that I built in Visual Studio. I just can't get the Report Designer that came installed with Data Dynamics to pick up my custom provider. What do I have to do to get that report designer to pick up my custom provider?
-Jason
Re: Custom Data Providers in Default Report Designer
08-13-2010, 1:39 AM
Jason,
I checked the scenario you described with the custom data provider sample that we ship with the product and the problem does not appear. I modify datadynamics.report.config file that resides at "C:\Program Files\Data Dynamics\Reports\1.6.1871.50\Assemblies\" by including the information about the custom data provider and I can see it in the list when I run datadynamics.reports.designer.exe and create the new data source.
Could you send us the content of DataDynamics.Reports.config from C:\Program Files\Data Dynamics\Reports\1.6.1871.8\Assemblies folder? It was not inserted properly in the first post of this thread.
Sergey Abakumoff
GrapeCity
Re: Custom Data Providers in Default Report Designer
08-13-2010, 12:43 PM
Hi Sergey, thanks for the feedback.
Just to update with a little more detail on this issue, I experimented today with building the sample Custom Data Provider project under Data Dynamics\Reports\1.6.1871.8\Samples\API\CustomDataProvider, and dropped that file in the assemblies directory with the default report designer. It picked up the CSV Data Provider from that assembly and used it just fine.
Obviously there's something I'm doing different with my own assembly that causes it not to be picked up by the default report designer, but I'm baffled as to what that might be. As I've mentioned, my Custom Data Provider works fine in the context of a project where I've built my own end-user designer. It is discovered and runs without any issue.
I've attached the assemblies and the datadynamics.report.config file that I'm using. It has the following files:
DataDynamics.Reports.Samples.CustomDataProvider.dll (contains CSV provider sample)
CustomDataProviderUI.dll (contains CSV dataset editor)
CEMLinkDataProviderLib.dll (contains my custom data provider, that doesn't work with default designer)
DataDynamics.Reports.config (contains references to both providers)
All of these files are in the "C:\Program Files\Data Dynamics\Reports\1.6.1871.50\Assemblies\" directory with the report designer executable. As I've mentioned, I'm sure there's something different that I've done with my data provider that causes it not to be found or loaded in this context, but I really don't know what that might be.
-Jason
Re: Custom Data Providers in Default Report Designer
08-13-2010, 3:26 PM
Hello,
CEMLinkDataProviderLib assembly is not signed with the strong name. Could you please sign it(with arbitrary key pair) and try again.
Here is the some helpful link : http://msdn.microsoft.com/en-us/library/xc31ft41.aspx
Sergey Abakumoff
GrapeCity
Re: Custom Data Providers in Default Report Designer
08-13-2010, 8:14 PM
I tried strong naming it, and giving the fully qualified name (with version, PublicKeyToken, etc.) in the config file. That didn't work. Now that I think about it, the sample CSV data provider that is currently working isn't in a strongly named assembly either. The issue must be something else.
-Jason
Re: Custom Data Providers in Default Report Designer
08-15-2010, 8:40 PM
I've found that the exception occurs while built-in designer tries to load the data provider factory from CEMLinkDataProviderLib assembly:
Could not load file or assembly 'CEMLinkDataProviderLib' or one of its dependencies.
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
DataDynamics.Reports.Designer.exe is built against .NET Framework 2.0, so it can't load the assemblies that are built against .NET Framework 3.0 or higher.
Sergey Abakumoff
GrapeCity
Re: Custom Data Providers in Default Report Designer
08-16-2010, 10:03 AM
I never once thought of it, but we're using .NET 4.0, so that makes sense.
Thanks for taking the extra time to research that specific assembly for me.
-Jason