connecting fastreport to the main uniconnection in delphi project
-
- Posts: 7
- Joined: Fri 02 May 2014 13:37
connecting fastreport to the main uniconnection in delphi project
hello ,
im using unidac in Delphi XE2 and unidac components for fastreport , everything is going ok , only I have one problem which is that when I add unitable or uniquery I need the database property to show me the main uniconnection of my project , same as BDE components for fastreport.
I don't want to put in every report unidac database and put all of its properties.
thanks in advance.
im using unidac in Delphi XE2 and unidac components for fastreport , everything is going ok , only I have one problem which is that when I add unitable or uniquery I need the database property to show me the main uniconnection of my project , same as BDE components for fastreport.
I don't want to put in every report unidac database and put all of its properties.
thanks in advance.
-
- Posts: 7
- Joined: Fri 02 May 2014 13:37
Re: connecting fastreport to the main uniconnection in delphi project
i found the solution , its just very simple !!!
specify the default database in the fastrepot unidac components
specify the default database in the fastrepot unidac components
Re: connecting fastreport to the main uniconnection in delphi project
Hello,
Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.
Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.
-
- Posts: 7
- Joined: Fri 02 May 2014 13:37
Re: connecting fastreport to the main uniconnection in delphi project
hello alexp
I just have another question , why i cant choose another database within the fastreport , i have two uniconnections in my application which connect to different databases but in some reports i want to use queries from the two databases , but i cant , because only one database is shown in fast report which is the one i choosed to be the default database in frxUniDACComponents1.
i hope i explained well my problem.
hope to hear from you soon.
thanks in advance.
I just have another question , why i cant choose another database within the fastreport , i have two uniconnections in my application which connect to different databases but in some reports i want to use queries from the two databases , but i cant , because only one database is shown in fast report which is the one i choosed to be the default database in frxUniDACComponents1.
i hope i explained well my problem.
hope to hear from you soon.
thanks in advance.
Re: connecting fastreport to the main uniconnection in delphi project
Depending on how you want to deploy your application, the following may or may not work for you:Ali.Mustapha wrote:hello alexp
I just have another question , why i cant choose another database within the fastreport , i have two uniconnections in my application which connect to different databases but in some reports i want to use queries from the two databases , but i cant , because only one database is shown in fast report which is the one i choosed to be the default database in frxUniDACComponents1.
i hope i explained well my problem.
hope to hear from you soon.
thanks in advance.
I'm using FastReport Professional 5.1 / UniDAC Professional 5.5.11 / Delphi XE2
Use the TfrxDBDataSet component. Then you can link this to any UniDAC dataset via the DataSet property. So if you have 2 UniQuery on your data module (one for each UniConnection), and if you want to switch the database at runtime, then for your frxDBDataSet component, you simply change the DataSet property to point to the correct UniQuery, and then re-open the report. The report (TfrxReport) is linked to the frxDBDataSet from inside (menu Report->Data).
--
Steve Faleiro
Re: connecting fastreport to the main uniconnection in delphi project
Please clarify where you can't add frxUniDACComponents1, and where in FastReport you want to see several Connections.
-
- Posts: 7
- Joined: Fri 02 May 2014 13:37
Re: connecting fastreport to the main uniconnection in delphi project
hi alex and Steve Faleiro,
sorry for the late in the reply , but I was in my annual vacation.
the problem that in fastreport when I add unidacquery it automatically select the Database property which is linked to the frxUniDACComponents1 default database property , which is very useful if I have one uniconnection in my app , but I have two uniconnection each one linked to different databases ( one local and the another is over network ) , in some reports I want to use both connections inside the fast report and not inside Delphi ( because in Delphi I can solve this issue but for end users who want to edit the reports it is not useful ).
so the solution must be that when I drop unidacquery in my report it must allow me to choose between the two connections.
sorry again for the late in the reply.
thanks for your help.
sorry for the late in the reply , but I was in my annual vacation.
the problem that in fastreport when I add unidacquery it automatically select the Database property which is linked to the frxUniDACComponents1 default database property , which is very useful if I have one uniconnection in my app , but I have two uniconnection each one linked to different databases ( one local and the another is over network ) , in some reports I want to use both connections inside the fast report and not inside Delphi ( because in Delphi I can solve this issue but for end users who want to edit the reports it is not useful ).
so the solution must be that when I drop unidacquery in my report it must allow me to choose between the two connections.
sorry again for the late in the reply.
thanks for your help.
Re: connecting fastreport to the main uniconnection in delphi project
Unfortunately, such behavior is not supported. You should use TfrxDBDataSet as stevel had recommended.