subreport question
I have a master detail report printing invoice header and invoice detail.
I have a grouping by invoice # to print some subreports on the summary band
for each invoice.
I would like to print a cover page before each invoice for some accounts. I
tried to put a group header to print the cover page but the report footer is
printing before the cover page. How can I do this?
Something like this:
cover page for acct # 1001
invoice header for inv # 12345 acct # 1001
invoice detail for inv # 12345
cover page for acct # 1002
invoice header for inv # 12388 acct # 1002
invoice detail for inv # 12388
(no cover page for acct # 1003)
invoice header for inv # 12398 acct # 1003
invoice detail for inv # 12398
Thanks
I have a grouping by invoice # to print some subreports on the summary band
for each invoice.
I would like to print a cover page before each invoice for some accounts. I
tried to put a group header to print the cover page but the report footer is
printing before the cover page. How can I do this?
Something like this:
cover page for acct # 1001
invoice header for inv # 12345 acct # 1001
invoice detail for inv # 12345
cover page for acct # 1002
invoice header for inv # 12388 acct # 1002
invoice detail for inv # 12388
(no cover page for acct # 1003)
invoice header for inv # 12398 acct # 1003
invoice detail for inv # 12398
Thanks
This discussion has been closed.
Comments
A couple things to try.
1. Which version of ReportBuilder are you using? If you have version 9.x
or higher, you can try placing the TppPageBreak object inside your group
header band to force a page break each time it is printed. This should give
you the extra page you need for each invoice.
2. Try using a Section subreport as your cover page. This type of
subreport will take its own page by default. Note that using these
subreports, you will need to change your main report layout a bit.
Something like the following should give you the best results.
- Main Report
- Detail Band
- Section Subreport - cover page
- Section Subreport - rest of the invoice
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Chris
My first suggestion would be to consider upgrading your version of
ReportBuilder. Perhaps download a trial edition of RB 10.02 and see if you
can get the effect you are after before upgrading.
Take a look at the following article on forcing a page break before version
9. Have you explored the second option given in my first post?
---------------------------------------------
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