DataSource of two Databases

Stimulsoft Reports.NET discussion
Post Reply
simgschw
Posts: 73
Joined: Mon Jan 07, 2013 1:34 pm

DataSource of two Databases

Post by simgschw »

Hi,

in my current project, I have to create a report, which uses the resultrecord from a sql datasource. This datasource uses data from two different databases. How should I implement this?

I created two sql databases and each has some datasources. But then I wondered how to create a datasource which uses datasources from both databases ...

Hope you got my problem.

Thx, greetings
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: DataSource of two Databases

Post by HighAley »

Hello.
simgschw wrote:in my current project, I have to create a report, which uses the resultrecord from a sql datasource. This datasource uses data from two different databases. How should I implement this?

I created two sql databases and each has some datasources. But then I wondered how to create a datasource which uses datasources from both databases ...
Maybe you could create a SQL query that with get all data in one table?

Thank you.
simgschw
Posts: 73
Joined: Mon Jan 07, 2013 1:34 pm

Re: DataSource of two Databases

Post by simgschw »

Hi,

before my first post, I tried what you suggested. This solution also works, but it does not satisfy the requirements from our customer. There have to be two different database connections in the report. Each connection has some datasources. Each datasource returns some records and these records have to be joined in some way to gain the same result as by doing the sql join in one datasource as you suggested.

Do you have any ideas?

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

Re: DataSource of two Databases

Post by Alex K. »

Hello,

In this case, you can set the CacheAllData property to true for report and then you can create a relations between datasources from different databases and use it in expression.

Thank you.
simgschw
Posts: 73
Joined: Mon Jan 07, 2013 1:34 pm

Re: DataSource of two Databases

Post by simgschw »

thx for the hint.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: DataSource of two Databases

Post by Alex K. »

Hello,

Let us know if you need any additional help.
Post Reply