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

NewPage property doesn?t function

edited February 2006 in Subreports
Hi!

I have a mainreport and in it?s summaryband 2 subreports.

I want the each subreport be printed on a new page.
Setting the "NewPage"-property in the Titleband of the subreports doesnt?t
function.
What can i do ?

Thanks, Chris!

Comments

  • edited February 2006
    Hi Chris,

    1. Try making your subreports Section style and see if that helps. This
    may however leave an empty page at the end of your report.

    2. Place a TppPageBreak object between each of the current subreports. The
    Page Break object was added for RB 9.x.

    3. See the following article on other options for causing a page break.

    ---------------------------------------------
    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.