Create a composite report and pass variables to the reports
Hello,
I want to create a report that calls other reports and feeds them variables. I have downloaded fastreports version 4.7 studio.
The programmer???s manual (FastReport_Studio_Programmers_Manual_(EN).pdf shows a sample piece of code on creating a composite report:
frxReport1.LoadFromFile('1.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('2.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;
I tried a test report and it failed.
Here is my initial code as written in the Code tab:
begin
TfrxReport.LoadFromFile('01.Simple list.fr3');
TfrxReport.PrepareReport;
TfrxReport.ShowPreparedReport;
end.
The Page1 tab is empty. The Data tab is empty. There is no Dialog tab set.
When I ran the script, it failed on PrepareReport and ShowPreparedReport.
Under the class TfrxReport, I found LoadFromFile and ShowReport ( I assumed this takes the place of ShowPreparedReport), but did not find PrepareReport.
I tried the script with Preview and ShowReport. This time it tried to run but it gave an error.
Here is the error:
Access Violation at address blahblah in module 'fastreport3.dll'
What are the replacements or updated names for PrepareReport and ShowPreparedReport?
I thought I would try to get a simple composite report working first. Once I get that part working, I would like to try a report that gathers some data???say a start and end date and then passes those variables to a series of reports to make one composite report.
Can you offer some suggestions?
Regards David
I want to create a report that calls other reports and feeds them variables. I have downloaded fastreports version 4.7 studio.
The programmer???s manual (FastReport_Studio_Programmers_Manual_(EN).pdf shows a sample piece of code on creating a composite report:
frxReport1.LoadFromFile('1.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('2.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;
I tried a test report and it failed.
Here is my initial code as written in the Code tab:
begin
TfrxReport.LoadFromFile('01.Simple list.fr3');
TfrxReport.PrepareReport;
TfrxReport.ShowPreparedReport;
end.
The Page1 tab is empty. The Data tab is empty. There is no Dialog tab set.
When I ran the script, it failed on PrepareReport and ShowPreparedReport.
Under the class TfrxReport, I found LoadFromFile and ShowReport ( I assumed this takes the place of ShowPreparedReport), but did not find PrepareReport.
I tried the script with Preview and ShowReport. This time it tried to run but it gave an error.
Here is the error:
Access Violation at address blahblah in module 'fastreport3.dll'
What are the replacements or updated names for PrepareReport and ShowPreparedReport?
I thought I would try to get a simple composite report working first. Once I get that part working, I would like to try a report that gathers some data???say a start and end date and then passes those variables to a series of reports to make one composite report.
Can you offer some suggestions?
Regards David
Comments
Hi,
Try to build composite report in your application but not in built-in FastScript.