Subreport on new page
interferenz
Dortmund
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
.. 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
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
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
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