Subreport paging issue

edited January 2012 in Subreports
I am having a problem with subreport that does not seem to see the end
of the data.

Ex. I have a report with a detail band only. In the detail band I have 2
subreports (section). The reports are basically showing the same data,
except one includes some extra images, etc. and the other is a
simplified view for printing. Only one view is shown at a time, the
other is set visible := false;

The report has 2 pages worth of data. When I click through the pages and
get to the 2nd page, the next page button loops me around to the first
page again, and then shows "Page 3" in the status bar. Continuing to hit
the next page button just keeps looping through the 2 pages and never ends.

Any ideas what would cause this behavior?


  • edited January 2012
    Hi Stacey,

    Which version of ReportBuilder and Delphi are you using? Does this
    behavior happen for both subreports (when they are visible) or just one?
    For instance, if you manually set one subreport visible False and
    print the report, then the other, do you get the same effect?

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited January 2012
    Hi Nico,

    Thank you for your reply. We're using Delphi 5 and RB 6.03 Enterprise.

    I seem to have, possibly, stumbled upon a partial answer...although I
    would like to find out if there is a better way to do this.

    I moved both supreports into a header section instead of the detail. At
    this point, the pagination was working for one report, but not the
    other. In this case, the working report was in portrait mode, and the
    non-working report was in landscape mode. When switching the non-working
    report to portrait mode, it now appears as if both reports have properly
    working pagination.

    But, I would really like to return the second report to landscape mode.
    Is there a way to use both and get the correct pagination?

    Also, along the same lines, after I got the pagination working
    "properly" I have added a button to the preview form that allows the
    user to switch between the two subreports. In testing, the first report
    has 2 pages, and the second report has 1 page (which is correct). When I
    toggle the visibility between the two subreports, it appears that the
    viewer keeps the pages set to whatever report was loaded when the viewer
    first appears. So, if the 2 page report is loaded first, then toggling
    to the 1 page report shows 1 page of data and then 1 blank page. If the
    1 page report is loaded first, then upon switching to the 2 page report
    the viewer only allows you to see the first page. Is there a way to get
    the viewer to reset the page count, other than what I've tried below?

    When the user clicks the button, I user the following code to toggle
    between the two reports:

    if (Report.Owner.FindComponent('ppWithImages') <> nil) and
    (Report.Owner.FindComponent('ppWithoutImages') <> nil) then begin
    TppSubreport(Report.Owner.FindComponent('ppWithImages')).Visible :=
    btnToggleImages.Tag = 1;
    := btnToggleImages.Tag = 0;


  • edited January 2012
    Hi Stacy,

    You are using a very old version of Delphi and ReportBuilder. Looking
    at the fixes we made for this version, I did not see anything specific
    to the issue you are experiencing however that does not mean there
    wasn't a bug present.

    In my testing with the latest version of ReportBuilder this is not an
    issue. I would highly suggest that you consider upgrading your version
    of Delphi and ReportBuilder. Not only is the feature set smaller with
    the possibility of more bugs in the older version(s), it is also
    untested or supported with today's operating systems and devices.

    Best Regards,

    Nico Cizik
    Digital Metaphors
This discussion has been closed.