Page 1 of 1

Fast Reports Unidac Connection

Posted: Mon 17 Feb 2014 21:07
by wjm4
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.

Re: Fast Reports Unidac Connection

Posted: Tue 18 Feb 2014 09:23
by AlexP
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.