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

Strange behaviour after changing dataset

edited May 2002 in General
I am running a report runtime whose dataset differs from the designtime
dataset. Fields are all the same but data is different. All goes well,
except the last record repeats to infinity, and if you click the last page
button the report previewer never finds the last page. Any ideas?

Jonathan Hyams

Comments

  • edited May 2002
    ------------------------------------------------------
    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. As a test, try setting
    DetailBand.PrintHeight to phDynamic. A dynamic height band can overflow to
    additional pages as needed.

    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.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    1. Autostop is False.
    2. Datapipeline is assigned.
    3. There are no sub-reports.
    4. There are no stretching bands.
    5. There are no controls set with ReprintOnOverFlow.
    6. The behaviour is not endless blank pages but endless last records. For
    example, in a report with 3 records you would see:

    Record 1 data line
    Record 2 data line
    Record 3 data line
    Record 3 data line
    Record 3 data line
    Record 3 data line
    Record 3 data line
    Record 3 data line
    Record 3 data line
    Record 3 data line

    ... ad infinitum

    Behaviour is only at runtime.

    Any other ideas?

    Jonathan Hyams


    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited May 2002
    Have you tried testing the report at runtime using the design time dataset
    (instead of the runtime dataset) to see if the problem occurs in that case
    as well?

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    I have just tried it. The behaviour is identical. Only at design-time do I
    get a sensible output.


    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited May 2002
    Are you using a DBPipe or another pipeline type? Do you have any event
    handlers assigned to the report and what do those do? If the problem
    persists please send, if possible, a simple project which demonstrates the
    problem to support@digital-metaphors.com.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    It's a DBPipe and no event handlers. What I will do is scrap the report and
    start again, if the problem repeats I'll send it to you.

    Thanks anyway for your help.

    Jonathan Hyams


    "Alexander Kramnik (Digital Metaphors)" wrote
This discussion has been closed.