FastReport 3.x and FrxMyDacComponent bug ?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 451
Joined: Wed 19 Jan 2005 09:59

FastReport 3.x and FrxMyDacComponent bug ?

Post by swierzbicki » Thu 11 Aug 2005 14:43


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:


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

Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by 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.

Post Reply