Subreport with extra page
Hi,
I have a report with a master and detail table.
The master table has the account # and invoice #.
I am getting an extra page at the end of the invoice group.
group1
account #
group2
invoice #
invoice date
subreport = invoice detail items
group2
footer
subreport = SECTION REPORT (1 page static information)
group1
footer
group1 and group2 start a new page.
My problem is there is an extra page at the end of group2.
The report works fine if the SECTION REPORT is disabled
account # 1000
invoice # 2000
SECTION REPORT
invoice # 2001
SECTION REPORT
Exra Page Here ???
account # 1001
invoice # 2011
SECTION REPORT
invoice # 2012
SECTION REPORT
invoice # 2013
SECTION REPORT
Exra Page Here ???
Please advise
Thanks
I have a report with a master and detail table.
The master table has the account # and invoice #.
I am getting an extra page at the end of the invoice group.
group1
account #
group2
invoice #
invoice date
subreport = invoice detail items
group2
footer
subreport = SECTION REPORT (1 page static information)
group1
footer
group1 and group2 start a new page.
My problem is there is an extra page at the end of group2.
The report works fine if the SECTION REPORT is disabled
account # 1000
invoice # 2000
SECTION REPORT
invoice # 2001
SECTION REPORT
Exra Page Here ???
account # 1001
invoice # 2011
SECTION REPORT
invoice # 2012
SECTION REPORT
invoice # 2013
SECTION REPORT
Exra Page Here ???
Please advise
Thanks
This discussion has been closed.
Comments
Section reports are not to be used in a master detail report like the one
you have below. They are designed to be used as a way to merge multiple
complete reports into a single report. By definition a section subreport
will take start and finish on its own page. If there is anything left to
print after the last section prints, such as a group footer, this will show
up as an empty page. Try using child subreports instead and TppPageBreak
components to get the effect you are after.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Does it have TppPageBreak components?
If not, is there another way to accomplish this?
Thanks
RB 7.x did not include the TppPageBreak component. I would first recommend
considering upgrading to the latest version of ReportBuilder (10.05) for
Delphi 7. If this is not an option, take a look at an older article on
forcing page breaks.
---------------------------------------------
Article: Forcing a Page Break
---------------------------------------------
Question:
How can I force a page break occur based upon a condition calculated at
run-time.
Solution:
Define a Group that starts on a new page when it breaks. Then use the
Group.OnGetBreakValue event to control the timing of the break.
1. From the Report Designer, select Report | Groups to access the Group
dialog.
2. Define a group based upon a static component, such as a Label or
Variable. Click the Start new page checkbox. Close the dialog.
3. Using the object inspector's drop down list, find and select the TppGroup
object.
4. Create an event-handler for the Group's OnGetBreakValue event.
5. Add code to set the break value.
procedure Form1.Group1OnGetBreakValue(Sender: TObject; var aBreakValue:
String);
begin
if condition then
aBreakValue := 'Some Value';
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com