Fast Reports Unidac Connection

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
wjm4
Posts: 72
Joined: Mon 12 Feb 2007 21:31

Fast Reports Unidac Connection

Post by wjm4 » Mon 17 Feb 2014 21:07

Hi,
I have an application that runs a fast report in 4 different threads(1 Report per thread). Each thread/report should connect to a different oracle database by setting the connection property of the TfrxUniDACComponents. I am using the below code to set this database within each thread. The report also resides within each thread.

Code: Select all

  TfrxUniDACComponents * fudc = new TfrxUniDACComponents(NULL);
  fudc->DefaultDatabase = c;
The issue: When I load a report in each thread, it uses only 1 of the connections and it is not picking up the local TfrxUniDACComponents. I have a feeling this is an issue with my understanding of how TfrxUniDACComponents works. Can you please explain how a report knows which TfrxUniDACComponents object to use to execute its unidac query against. The query is within the report on the data page.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Fast Reports Unidac Connection

Post by AlexP » Tue 18 Feb 2014 09:23

Hello,

You don't need to create a separate TfrxUniDACComponents object instance, this component serves only to register the TfrxUniDACComponents class. To register the class, it's enough to place a link to the frxUniDACComponents module into the Uses section (the component is created for user convenience). In order for report to work with different connections, you should create several reports, in which separate connections will be created.

Post Reply