Store Reports in DB / DataSets
Hi,
my first topic, let??s try....
In my program all reports for different data to print are stored in a database table,
save/load works fine by doing it like descripted in the manuals.
My question is:
I want the user to be able to edit all reports from a central formular,
where he picks a report from a list.
Then i load that report from db and do .DesignReport on it.
Everything is OK, the only problem is that the reports use different configured TfrxDBDataset each.
These TfrxDBDatasets are placed and configured on the specialist forms where the data are printed.
If i edit the reports in my central formular (without the spezialized TfrxDBDatasets in it) the data that are
useable in this report are not shown.
I hope you can understand what my approach (and problem) is, and i have to apoligize for my poor english, sorry.
best regards,
Siggi
my first topic, let??s try....
In my program all reports for different data to print are stored in a database table,
save/load works fine by doing it like descripted in the manuals.
My question is:
I want the user to be able to edit all reports from a central formular,
where he picks a report from a list.
Then i load that report from db and do .DesignReport on it.
Everything is OK, the only problem is that the reports use different configured TfrxDBDataset each.
These TfrxDBDatasets are placed and configured on the specialist forms where the data are printed.
If i edit the reports in my central formular (without the spezialized TfrxDBDatasets in it) the data that are
useable in this report are not shown.
I hope you can understand what my approach (and problem) is, and i have to apoligize for my poor english, sorry.
best regards,
Siggi
Comments
because this is a real urgent issue for me, please let me know if any important infos are missing for you to help me....
Any tips are eagerly-awaited.. ;-)
Thank you in advance.
For now and to the point I find a better solution, I will ude this tip by the FAQs
Question: How to disconnect the use of global list of Datasets when using TfrxReport in a stream ?
Answer
At default FastReport uses grobal Datasets list which are initialized in the module frxClass. After creating copies of TfrxDBDataset, it adds it them this list. In view of this, it???s not possible to use Datasets with the same name (Even in different streams). For using local Datasets , you need to use the following code :
frxReport.EngineOptions.UseGlobalDataSetList := False;
frxReport.EnabledDataSets.Clear();
frxReport.EnabledDataSets.Add(frxDataSet);
frxReport.LoadFromFile(ReportName);
So I will assign the correct DataSet to the Report after loading....