I have an application that uses Fast Reports (bundled with Delphi) and I would like to duplicate the report in another form/datamodule.
I have tried do do this using each of the following methods:
I have tried to copy and paste the TfrxReport and TfrxDBDataset from the original form to the new datamodule.
I have also tried manually copying the relevant lines from the form.dfm file and inserted it into the datamodule.dfm file.
And lastly I have saved the report to an fr3 file and opened it in the report designer on the datamodule.
In each case the report runs but produces (many) pages with no visible data.
My questions are:
will the methods I have used successfully duplicate my report?
How can I show my data? It seems that the report is receiving my data; just not showing it
I have set the report dataset on the datamodule to be the frxDBDataset on the datamodule.
Just a couple of wild guesses:
Is there one or more other components that the FastReport components that you’re copying across are linked to maybe?
Probably not applicable, but are there any event handlers on either of the components that are needed because they’re loading/processing the data before the report is shown?
I did check the event handlers and associated components.
The only component being used was the TfrxDBDataset component which I
copied although the (non FR) dataset was not copied as I wanted to use
the one on the datasource.
I did check the the fieldnames of the two datasets (both
TClientDatasets) and there were differences but there were also fields
withe the same name.
As you did not say the the methods I used were not correct I am assuming
that the methods used were reasonable.
My current thought is that the sequence of the data in the two
clientdatasets are different.
Thanks for your assistance.
I’m pretty sure that I’ve copied FastReports from one unit to another in a similar way to you and don’t recall having problems, so it should be fine.
Perhaps try creating a new report with just a single field being shown and see if that works with the dataset that you have copied across. If that works, you should be able to copy the components within the report across and see if that works - if not, try deleting components off the report until it starts working again.