You'll have to change the report layout design so that the report will fit twice on the A4 paper size. You can configure the report to fit on half the A4 page. If you are just using the detail band, you can set the DetailBand.BandsPerRecord property to 2. Otherwise, you can save the report to a template file. Then load the report template into two different subreports in the main report. The main report will only contain the two subreports. See the main reports demo #51 and 52 for an example of this approach to printing different reports in one main report.
I put 2 subreports in one main repor set printbehavior to pbsection but it prints in 2 pages, the height of subreports is 145 margins all 0. why it puts 2 pages.
Sorry, I neglected to mention that you should not use the pbSection style subreport. You can use two child type subreports instead. This way they won't start on a new page. Make sure to set the bottom one to shift relative to the top subreport.
You can also use two fixed style subreports instead of child type. You need to resize the fixed subreport component's height in order to specify the area in which the subreport is allowed to generate in the parent detail band.
Jim it works but it has a new problem. wen the details records fill all the detail band I need to put "CONTINUE" in the footerband but the first ppchildreport don't let me print the ppchildfooterband on the first subreport. The second subreport print Ok whith footer "continue" and on Summaryband the Total of report in next page I put some code on the ppsummaryband beforeprint event " ppchildreport1.FooterBand.Visible:=false;
The child type subreport doesn't support the header and footer bands. The header and footer are part of the main report. The main reports demo project shows how to show a continued label in the report as the detail subreport breaks over multiple pages. See the main demos for master detail and subreports (#61 - 73). You could detect when the detail band is (DetailBand.OutOfSpace = True) and then show a label in the main report's page footer band.
Comments
twice on the A4 paper size. You can configure the report to fit on half the
A4 page. If you are just using the detail band, you can set the
DetailBand.BandsPerRecord property to 2. Otherwise, you can save the report
to a template file. Then load the report template into two different
subreports in the main report. The main report will only contain the two
subreports. See the main reports demo #51 and 52 for an example of this
approach to printing different reports in one main report.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks for the anser.
I put 2 subreports in one main repor set printbehavior to pbsection but
it prints in 2 pages, the height of subreports is 145 margins all 0.
why it puts 2 pages.
subreport. You can use two child type subreports instead. This way they
won't start on a new page. Make sure to set the bottom one to shift relative
to the top subreport.
You can also use two fixed style subreports instead of child type. You need
to resize the fixed subreport component's height in order to specify the
area in which the subreport is allowed to generate in the parent detail
band.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Jim it works but it has a new problem. wen the details records fill all
the detail band
I need to put "CONTINUE" in the footerband but the first ppchildreport
don't let me
print the ppchildfooterband on the first subreport. The second subreport
print Ok whith
footer "continue" and on Summaryband the Total of report in next page
I put some code on the ppsummaryband beforeprint event
" ppchildreport1.FooterBand.Visible:=false;
ppSummaryBand1.PrintPosition:=ppchildreport1.Printersetup.Paperheight-ppchil
dreport1.PrinterSetup.MarginBottom-ppSummaryBand1.Height;"
thanks a lot for the help
Ps
I put child style
I use delphi4 RB Enterprise 6.03
thanks again.
header and footer are part of the main report. The main reports demo project
shows how to show a continued label in the report as the detail subreport
breaks over multiple pages. See the main demos for master detail and
subreports (#61 - 73). You could detect when the detail band is
(DetailBand.OutOfSpace = True) and then show a label in the main report's
page footer band.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com