TfrxReport

edited 10:10AM in FastReport 4.0
Is there any way to combine several different TfrxReport into single one?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:10AM
    read the programmers manual on building a composite report
    you can also append the previewpages of one reportcomponent to the previewpages of a previously prepared report component(must contain at least 1 previewpage).
  • edited 10:10AM
    Thank for the answer. In programmers manual there is explanation how to create composite report like following:

    frxReport1.LoadFromFile('1.fr3');
    frxReport1.PrepareReport;
    frxReport1.LoadFromFile('2.fr3');
    frxReport1.PrepareReport(false);
    frxReport1.ShowPreparedReport;

    I was thinking on following:

    frxReport1.PrepareReport;
    frxReport2.PrepareReport;

    and then somehow to make it into single report.
    Actually in my program I have option to create either first or second or both as one report. I would like to have both report components available in design time and then to combine into single report.

    Simon
  • gordkgordk St.Catherines On. Canada.
    edited 10:10AM
    frxReport1.PrepareReport;
    frxReport2.PrepareReport;

    frxreport1.PreviewPages.AddFrom(frxreport2);
    however if you are using page numbering variables their output will not be correct.
  • edited 10:10AM
    thanks for the answer
  • edited 10:10AM
    I just found your thread.

    I have a few questions about composite reports.
    Is the given example using reports that are static--that have no dialogPage?
    How could I make a composite report that accepts input variables and passes them to all the reports
    called by the composite report? For example, what if I want to create a Composite report with a
    dialogPage that takes in a start and end date, how would I pass those variables to the combined reports?

    Thanks
    gordk wrote: »
    frxReport1.PrepareReport;
    frxReport2.PrepareReport;

    frxreport1.PreviewPages.AddFrom(frxreport2);
    however if you are using page numbering variables their output will not be correct.
  • gordkgordk St.Catherines On. Canada.
    edited 10:10AM
    use variables after loading and before calling prepare set the variable values as described in the programmers manual, better to use your own dialog in such a case.
  • edited 10:10AM
    Thank you for the response, I will give your suggestion a reply.
    regards David
  • edited 10:10AM
    gordk wrote: »
    use variables after loading and before calling prepare set the variable values as described in the programmers manual, better to use your own dialog in such a case.

    I finally found some time to working in this.
    I tried to call a sample report by modifying the script in the programmer's manual.

    frxReport1.LoadFromFile('1.fr3');
    frxReport1.PrepareReport;
    frxReport1.LoadFromFile('2.fr3');
    frxReport1.PrepareReport(False);
    frxReport1.ShowPreparedReport;

    However I am using version 4.7 Studio. 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 no find PrepareReport.
    I tried it with Preview and ShowReport.
    Here is my intiala code as written in the Code tab:

    begin
    TfrxReport.LoadFromFile('01.Simple list.fr3');
    TfrxReport.Preview;
    TfrxReport.ShowReport;
    end.

    The Page1 tab is empty. The Data tab is empty. There is no Dialog tab set.

    I get the following error:
    Access Violation at address blahblah in module 'fastreport3.dll'

    Can you offer some suggestions?
    regards David
  • gordkgordk St.Catherines On. Canada.
    edited 10:10AM
    the best would be to first post in the correct forum or news groups
    the answer i gave was for fr4 not studio version , since i do not work with it.
  • edited 10:10AM
    Thanks for the input.
    regards David
    gordk wrote: »
    the best would be to first post in the correct forum or news groups
    the answer i gave was for fr4 not studio version , since i do not work with it.

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.