Custom Data Adapter

Stimulsoft Reports.NET discussion
Post Reply
Damian
Posts: 7
Joined: Tue May 11, 2010 8:28 am
Location: CH

Custom Data Adapter

Post by Damian »

Hi,

Is it possible to build your own database adapter?

We are looking to replace our old reporting system.
In this system we do have a lot of custom SQL commands and some preprocessing that is necessary for running the query against different databases.

Since we can not connect directly to our databases, we are wondering if it is possible to implement our own database adapter. We are planing to use this custom adapter as a wrapper for our COM+ database Object.
It would be nice if you have an Interface that we could implement and then the connection would be available in the designer under New connection...

Kind regards
Damian
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Custom Data Adapter

Post by Jan »

Hello Damian,
Damian wrote:Hi,

Is it possible to build your own database adapter?

We are looking to replace our old reporting system.
In this system we do have a lot of custom SQL commands and some preprocessing that is necessary for running the query against different databases.

Since we can not connect directly to our databases, we are wondering if it is possible to implement our own database adapter. We are planing to use this custom adapter as a wrapper for our COM+ database Object.
It would be nice if you have an Interface that we could implement and then the connection would be available in the designer under New connection...

Kind regards
Damian
Yes of course you can create your own database adapter. On following page you can find adapters which already created for our products: http://stimulsoft.com/Downloads.aspx
You can get any of this adapter and can use it as base for your own adapter.

Please contact us if you need any help.

Thank you.

Thank you.
shazam
Posts: 6
Joined: Sun Apr 03, 2016 7:55 pm

Re: Custom Data Adapter

Post by shazam »

Hi,

Can't find custom adapters sample in the download page.
I'm interested in a custom adapter source code working on both wpf and winform designer.
My goal is to be able to show a custom dialog in order to collect data source settings and display some internal data.

Could you provide me a sample ?


Thanks

Mathieu
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Custom Data Adapter

Post by Alex K. »

Hello,

In last releases, all additional data adapters were included directly in the designer.
For older version, please check the data adapters in the attachment.

Thank you.
Attachments
PostgreSQL.zip
(19.88 KiB) Downloaded 357 times
MySQL.zip
(38.43 KiB) Downloaded 393 times
Oracle.zip
(69.26 KiB) Downloaded 307 times
Chris42
Posts: 27
Joined: Fri Aug 18, 2017 5:50 pm

Re: Custom Data Adapter

Post by Chris42 »

Hi,

Can you confirm it it's still possible to add a Custom Data Extension to the supplied designer (e.g the WinForms version)?

I have a custom adapter that I can use from our main application it appears to work OK when I register it in the recommended way:

Code: Select all

            StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiTestXAdapterService());
            StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiTestXDatabase());
The details on this page imply custom adaptors can be added but I've failed to make it work and from the above comment I suspect this facility has now been removed.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Custom Data Adapter

Post by HighAley »

Hello, Chris.

There was a code refactoring. Please, try to use next code:

Code: Select all

StiOptions.Services.DataAdapters.Add(new Stimulsoft.Report.Dictionary.StiTestXAdapterService());
StiOptions.Services.DataBases.Add(new Stimulsoft.Report.Dictionary.StiTestXDatabase());
Thank you.
Chris42
Posts: 27
Joined: Fri Aug 18, 2017 5:50 pm

Re: Custom Data Adapter

Post by Chris42 »

Hi HighAley,

Thanks for the reply. My current code works. However, my issue isn't that it will work in my own designer project...

What I was wanting to do was avoid having to maintain a designer project. I wanted to be able to somehow add my custom adapter/extension to the designer(s) supplied by Stimulsoft. So for example when I run C:\Program Files (x86)\Stimulsoft Reports 2017.1.11\Designers\.NET\Designer.WinForms.exe it will show my adapter as an option. The documentation implies that it's possible to just put the appropriate assembly in the same folder under Program Files and it will be found and loaded.

It's not a big issue and I'm happy to go with my own designer project, just would give me options for those that already have Stimulsoft installed and just want to design reports using the custom adapter.

Chris
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Custom Data Adapter

Post by Andrew »

Dear Chris,

Please check our license at http://admin.stimulsoft.com/licenses/License.rtf
exe files are not allowed to be distributed. You may distribute only those files which are listed in the section Redistributables of our license.

Thank you.
Chris42
Posts: 27
Joined: Fri Aug 18, 2017 5:50 pm

Re: Custom Data Adapter

Post by Chris42 »

Hi Andrew,

Thanks. Yes, I realise that. It's for use for our designer who will have a licence and the Stimulsoft software installed. I think I'll just stick to maintaining our own designer anyway as it looks like it's going to be easier.

Thanks,
Chris
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Custom Data Adapter

Post by Andrew »

Okay,

Thank you.
Post Reply