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

Two pass mode problem

edited March 2014 in General
Hello, I'm using RB 14.04 enterprise and I have a problem with a report
using Two-Pass Mode.

When I preview the report at the end of the first page the detail rows
stop five rows before the end of the page but when the first page is
regenerated in the second pass, the last five rows appear.

In this situation in the second page the same five rows is reprinted.

This problem disappear if I set the single pass mode but I must use the
two-pass mode because I must know the total number of pages printed.

Thank you in advance.

Massimo

Comments

  • edited March 2014
    Hi Massimo,

    Please upgrade to RB 14.08 and retest your application. If you still
    get the issue, I recommend downloading a trial of the latest version of
    ReportBuilder and testing with that.

    For upgrade instructions, contact info@digital-metaphors.com with your
    serial number and purchasing email address.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2014
    Hi Nico and thank you for your immediate answer.

    I have retested the application with RB 14.08 and 15.03 but the problem
    persist.

    Do you have any other suggestion ?

    Thank you.

    Massimo
  • edited March 2014
    Hi Massimo,

    Please create a simple example demonstrating this behavior using only RB
    and Delphi components and send it to support@digital-metaphors.com in
    .zip format.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2014
    Hi Nico,
    unfortunately the report is very complex (seven sub-reports and a lot of
    rap code) and Is very difficult to reproduce this behavior on a simple
    report.

    I set into the create event (in rap mode) the two pass mode on a
    condition, using this command :

    Report.PassSetting := psTwoPass;

    Is correct ?

    Since the only purpose for which I use the Two pass mode is to find the
    total number of pages that will be printed, to circumvent the problem
    there is the possibility of knowing how many pages will be printed and
    avoid using the two-step?

    Thank you.

    Massimo
  • edited March 2014
    Hi Massimo,

    The code you have to set the PassSetting looks correct.

    Unfortunately the only way to know how many pages will be in the report
    is to have a two pass report.

    Best Regards,

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

    Hi Nico,
    I have found the problem that is related to the footer band.

    Into the report structure the footer band was visible and into the
    create method I had set footer.visible to false and then to true only in
    a particular condition.

    To solve the problem I have deleted the previous statement in the create
    event, I have set in the footer band of the report structure the visible
    parameter to false and in the beforeprint event of the footer i set the
    visible to false or true.

    I hope those informations will be useful to other Reportbuilder users.

    Thank you for the support.

    Massimo
  • edited March 2014
    Hi Massimo,

    Thanks for the information. Yes, altering the visibility of the footer
    band for certain conditions could cause issues with page measurement
    during the first pass of the report if it became out of sync with the
    second pass (which it appears it was when using the OnCreate event).

    I'm glad you got it solved.

    Best Regards,

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