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

Printing Hundreds of pages

edited August 2001 in General
I have a report that has three subreports. The main document has a Title
band.

The SubReport contains a Memo field which encapsulates data to be
printed/exported. This allow us to print columns horizontally and keep the
groups together.

The Memo Field Stretch is set to true as the data probably will change based
on the data selected.

When I print the report which is only 1 page( which maybe 2 after
implementation), it set the printer into a continuous loop. At one point the
printer was set to print 1700 pages before I caught it.

What's going on and how can I stop it.

Gary

Comments

  • edited August 2001
    The detail band should be set to a static height when the column traversal
    is set to left to right. The reason is that it has not been resolved in the
    engine design. The stretching memo probably breaks the report engine,
    because the engine is built to support vertical stretching. Our todo list
    includes better left to right support, but for now, left to right traversal
    is used mostly for static height detail bands and label printing.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    I think you have your posting crossed. This one is a problem with a Memo
    component; there is no columnTraversal with this one. This TppMemo
    component on the report is populated form another TMemo component that is
    populated in the application.

    Gary

  • edited August 2001
    Maybe I misunderstood what you are saying about this:


    Anyways, you are saying that you have a strethcing memo in the detail band?
    When controls in the detail band are set to stretch = True, the band should
    automatically become a DynamicHeight band. But, when the column traversal
    is left to right, it will not allow this.

    Is this report not a left to right column traversal report? I apologize if
    I'm making too many assumptions.

    As for infinite pages, these are the common causes:

    ------------------------------------------------------
    Article: TroubleShooting: Report Prints Endless Pages
    ------------------------------------------------------

    Occasionally, we have customers state that their reports are in some
    infinite state where page after empty page prints forever.

    There are a few items to check when this occurs.

    The TppReport.AutoStop property is the first thing to check. If this is
    false when the DataPipeline property is unassigned, the endless report
    will be the result. AutoStop is automatically set to True when
    DataPipeline is set to nil, but it is possible to set it back to False.
    Check for instances in your code where you might have created this
    condition.

    Another thing to check is that all subreports in your report have their
    DataPipeline set. When a subreport does not have its pipeline set, you
    will sometimes see a condition where the first detail record prints and
    then you get blank pages.

    Another, non-data related cause can sometimes be your margin settings.
    If you have stretching bands that need to overflow to the next page, if
    your margins are too tight, sometimes the report engine will endlessly
    overflow to the next page trying to fit the overflow material.

    Still another cause might be having a statically positioned control, set
    to ReprintOnOverFlow, in the same band with a stretching control. For
    instance, if you have a memo set to stretch and in that same band, a
    label control set to ReprintOnOverFlow, then on every page after the
    first, the memo will begin to print after the label control. If the
    label is placed low enough that the memo has no room to print, the
    report will forever be trying to print the overflowing memo on the next
    page.

    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    For this one the TMemo field is populated and the "columns" are actually tab
    stops. The lines are built to allow only 4 tabs per line so when completed
    it looks like columns.

    In the BeforPrint the TppMemo is populated thusly:
    TppMemo.Lines := TMemo.Lines

    So you can see it is not a column traversal but simply a populated memo
    component.


    Gary


  • edited August 2001
    What prints on the printer? Empty pages? Continous text over and over
    again?

    I would check to make sure you're not causing an event to get triggered
    inside that particular event's event handler. Something like accessing the
    text on a text component in its OnGetText event would do this for sure. Are
    you using Delphi event handlers, or is this in RAP? Put a breakpoint in the
    Delphi event handler, and check to see what actual text is being assigned.

    You could also isolate the memo problem into a new report. Just place a
    memo in a blank report and get that working first, then port it over into
    the full report.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    It seems to have been a fluke. I deleted the TppMemo component and replaced
    it with new on the subreport and it is working fine.

    What made me think something was amiss was that at first, after printing the
    correct document, it would continue printing out headers and footers . I
    noticed that it was also duplicating the first group of counties. I set the
    TMemo to Clear before being populated to ensure we weren't adding info to
    lines that were already there. After that blank pages were printing out.
    Which in my eyes had nothing to do with the TppMemo.

    So then as I often do I deleted the TppMemo component and added a new one
    and that seems to have cleared up the problem.



  • edited August 2001
    Glad to hear its working.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.