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

Infinite Loop / Pages Created (With Workaround / Solution)

edited January 2013 in General
Hi,

I have been having a problem with one of my reports where it is printing
infinite pages. The report is a little complex but I'll try to explain.

The Report is connected to a dataset. In the report, we are wanting the
first page to print in a particular format, and subsequent pages to
print a very basic header, and then just some of the information in the
detail band.

The reports design is effectively


SUBREPORT1 (No Data Pipeline Assigned)
SUBREPORT3 (No Data Pipeline Assigned)
^ Title----------------------------------
SUBREPORT2 (No Data Pipeline Assigned)
SUBREPORT4 (No Data Pipeline Assigned)
^ Header----------------------------------
ppDBLabel1 PPDBLabel2 PPDBMemoPROBLEM
^ Footer----------------------------------
ppDBCalc1
^ Summary---------------------------------
Lots of stuff in here...
^ Page Layout.



On the reports OnStartPage event I have the following:

procedure TReportPackInstEX28B.PPReport1StartPage(Sender: TObject);
begin
PPReport1.FooterBand.visible := PPReport1.AbsolutePageNo < 2;
PPDBMemoPROBLEM.visible := PPReport1.AbsolutePageNo < 2;
PPDBLabel2.visible := PPReport1.AbsolutePageNo < 2;
ppPageStyle1.visible := PPReport1.AbsolutePageNo < 2;
ppDBCalcTotal.visible := PPReport1.AbsolutePageNo < 2;
ppDBCalcBagTotal.visible := PPReport1.AbsolutePageNo < 2;
end;


Now here is the problem. PPDBMemoProblem is set to stretch, as is the
Footer. When this turns invisible for subsequent pages, this throws the
printing into an infinite loop.

I have managed to get around the problem by leaving the component
visible, and instead changing the Datafield property to blank.

I am running Reportbuilder 14.06 on Delphi 2007. I don't know why this
is happening, and I have found a workaround, but didn't know if this is
a bug that should be addressed, or alternative if this might help
someone else down the track.

Cheers

Adam.

Comments

  • edited January 2013
    Hi Adam,

    We have not seen this behavior before.

    The footer band of a report is static (it cannot stretch). If you need
    an item to stretch, I suggest using a Group Footer instead.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2013
    Hi Nico,

    My apologies - I got that wrong. The PPDBMemoProblem component (the one
    that is dynamic and stretches) is supposed to be in the DETAIL band, if
    this is of any help, and it's the Detail band that is set to Dynamic. I
    miswrote footer in my first post by accident.

    Sorry for the confusion.


    SUBREPORT1 (No Data Pipeline Assigned)
    SUBREPORT3 (No Data Pipeline Assigned)
    ^ Title----------------------------------
    SUBREPORT2 (No Data Pipeline Assigned)
    SUBREPORT4 (No Data Pipeline Assigned)
    ^ Header----------------------------------
    ppDBLabel1 PPDBLabel2 PPDBMemoPROBLEM
    ^ Detail Band-----------------------------
    ppDBCalc1
    ^ Summary---------------------------------
    Lots of stuff in here...
    ^ Page Layout.

    Cheers

    Ada.m
  • edited January 2013
    Hi Adam,

    My first suggestion would be to upgrade to RB 14.07 and see if the
    problem still exists.

    If so, try to create a simple example I could run here and please send
    it to support@digital-metaphors.com in zip format for me to research.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2013
    Hi Nico,

    Thanks for your reply. I can confirm that the problem still exists with
    14.08. I'll need some time to reduce the report to a simple demo, which
    I don't have at the moment unfortunately, so I'll just use my work
    around at present until I have some spare time on my hands and then will
    revisit it.

    Have a great day!

    Adam.

This discussion has been closed.