FastReport 3.x and FrxMyDacComponent bug ?

FastReport 3.x and FrxMyDacComponent bug ?

Postby swierzbicki » Thu 11 Aug 2005 14:43

Hello,

It looks like a bug (i'm not really sure) :

Create a new project.
Add a datamodule.
Rename the Datamodule to fmDatamodule

On the datamodule put this components :

TMyConnection , TFrxMyDacComponent , TFrxReport , TFrxDesigner
On the TFrxMyDacComponent , set the DefaultDatabase property with the TMyConnection name.

Now Double click on the TFrxReport
Add a new MyDAC Query Component.
You will see that the MyDAC Query is automatically set to the correct Database.
Put an SQL statement , add some fields to the report and preview it : it is well working.

Close the designer (report will be saved in the dfm).

On the main form put a button
Assign this code:

fmDatamodule.frxReport1.DesignReport;

Compile and run the project
Click the button

Bang : EDatabaseError : Connection is not defined.

It sems that the "Designed FrxMyDAC component" loose his databasename.

Is it possible to fix this ? IF yes which line of code must I replace ?

Thank you

Ps : same behaviour with MyDAC 3 / 4 comps
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Postby swierzbicki » Mon 22 Aug 2005 12:47

Problem solved : in the object creation order, frx objects were prior to mydac objects. Reordering that solves my issue.
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59


Return to MySQL Data Access Components