I've been created a report with 3 subreport (the main report doesn't contain any another components, just the 3 subreport). I want to start a new page, when the 3rd subreport is starting. How can I do this?
Be sure you have the ShiftRelativeTo property set for each subreport. Then try setting the third subreport to a Section style subreport. This will by defintion start a new page for the subreport.
I've a dataset (it is an example), with three columns: Type, CustomerName, CutomerAddress. "Type" column possible values: 0 - Customer line 1 - Address line 2 - New page line
I've three subreports: CustomerSubReport, AddressSubReport, and NewPageSubReport (it is a blank). When the Type is 0, the 2. and the 3. subreports are invisible, when the Type is 1, then the 1. and the 3. subreports are invisible, etc. And. When the type is 2, then I want to do a new page. How can I do that?
When you set the Band.OutOfSpace property to True, the report engine will think that the band has run out of space and break to the next page. The only reason you would be seeing two pages when you break is that there is something else going on in your report. Be sure your blank subreport is set back to Child. If you would like, you can send an example of your report in .zip format to support@digital-metaphors.com and I'll take a look at it for you.
Comments
Be sure you have the ShiftRelativeTo property set for each subreport. Then
try setting the third subreport to a Section style subreport. This will by
defintion start a new page for the subreport.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I've a dataset (it is an example), with three columns: Type, CustomerName,
CutomerAddress.
"Type" column possible values:
0 - Customer line
1 - Address line
2 - New page line
A possible dataset values:
0, 'Customer 1', Null
1, 'Customer 1', 'Cust1.Addr1'
1, 'Customer 1', 'Cust1.Addr2'
1, 'Customer 1', 'Cust1.Addr3'
2, 'Customer 1', Null
0, 'Customer 2', Null
1, 'Customer 2', 'Cust1.Addr1'
1, 'Customer 2', 'Cust1.Addr2'
2, 'Customer 2', Null
0, 'Customer 3', Null
1, 'Customer 3', 'Cust1.Addr1'
1, 'Customer 3', 'Cust1.Addr2'
1, 'Customer 3', 'Cust1.Addr3'
1, 'Customer 3', 'Cust1.Addr4'
2, 'Customer 3', Null
...etc.
I've three subreports: CustomerSubReport, AddressSubReport, and
NewPageSubReport (it is a blank). When the Type is 0, the 2. and the 3.
subreports are invisible, when the Type is 1, then the 1. and the 3.
subreports are invisible, etc.
And. When the type is 2, then I want to do a new page. How can I do that?
Peter
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok, but if I do, what you proposed, I've got 2 new pages...:(
Peter
When you set the Band.OutOfSpace property to True, the report engine will
think that the band has run out of space and break to the next page. The
only reason you would be seeing two pages when you break is that there is
something else going on in your report. Be sure your blank subreport is set
back to Child. If you would like, you can send an example of your report in
.zip format to support@digital-metaphors.com and I'll take a look at it for
you.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
page...and freeze...:(
I wrote the following code to the last (3rd) subreport's
Detailband.OnBeforePrint:
ppDetailBand3.OutOfSpace:=True;
...then the report generator runs out of the world
Peter