Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

NewPage on subreport

edited March 2004 in General
Hi!


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?

Peter

Comments

  • edited March 2004
    Hi Peter,

    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Yes, I've tried, but...

    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



  • edited March 2004
    This question was handled through email. Please do not cross post.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Hi!

    Ok, but if I do, what you proposed, I've got 2 new pages...:(

    Peter


  • edited March 2004
    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    I've tried the OutOfSpace....Now, the report generator generate endless
    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


This discussion has been closed.