Create a composite report and pass variables to the reports

edited 7:36PM in FastReport Studio
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

Comments

  • edited 7:36PM


    Hi,
    Try to build composite report in your application but not in built-in FastScript.
  • edited 7:36PM
    I have found a lot of useful information from this particular place. I'm having a good time around here. Keep going.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.