Subreport on new page

interferenzinterferenz Dortmund
edited 4:24PM in FastReport 4.0
Hello,

I have to design a a special kind of invoice where on the first page a summary should be printed.
I have created a subreport with a descent dataset for this task.
On the main report there is a group header (by invoice-no), i have placed the subreport before the group header.

In this case the subreport is merged as a kind of overlay and will be overriden by the main report.

However, if I try to force a new page after the subreport with
procedure Subreport1OnAfterPrint(Sender: TfrxComponent);
begin
    engine.newPage                            
end;

.. nothing is printed, the first page stays empty.

What is the correct position and setting of a subreport which should be triggerd by a group break and starts on a new page ??

Thanks in advance
Volker

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:24PM
    not enough info
    but i would try something like this assumming your subrep contains all info for the customers invoices.
    nested groups
    groupheader1 condition customer number place subrep in this band or in a child band
    groupheader2 codition invoice
    masterdata
    groupfooter7
    groupfooter1

    if groupheader contains subrep usits oap event to force the newpage or the childs oap if using a child.
  • interferenzinterferenz Dortmund
    edited 4:24PM
    gordk wrote: »
    not enough info
    but i would try something like this assumming your subrep contains all info for the customers invoices.
    nested groups
    groupheader1 condition customer number place subrep in this band or in a child band
    groupheader2 codition invoice
    masterdata
    groupfooter7
    groupfooter1

    if groupheader contains subrep usits oap event to force the newpage or the childs oap if using a child.




    Hi, thanks for your response!


    Due to several reasons I cannot use nested groups for the invoice summary on the first page.
    It must be a complete invoice with headers and footers, but with another grouping for the master data.

    So I have tried to use a subreport, but I do not have a clue why the main report overwrites the subreport.
    I simply want the subreport to start with a new page, printing 1-n pages, and after that the main report has to continue on a new page.

    Seems to be a simple task but it does not work...



    thx
    Volker

  • gordkgordk St.Catherines On. Canada.
    edited 4:24PM
    here are some tips to keep in mind
    the subreport must be placed in a band,
    it cannot be itterating through the dataset used in the main report or it will close the dataset
    and there will be nothing to output.
    bands are output from top down depending upon their type
    objects within the band are processed left to right in the order inwhich they are created.
    Last you may want to look at using the onmanual build event to control band output.
    if you can post a sample based on the data available in the maindemo

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.