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

Summary band reprints

edited October 2004 in General
I have 6.03, Delphi 6. The report is set up with a combination of JIT
pipelines for the headers and a DB pipeline for the detail. There is only
one header at any given time. The problem is that the summary band prints
twice with certain numbers of detail lines. The band is 3.2292 inches tall,
phStatic, contains a lot of tppMemo, tppLabel, and tppLine components, none
of which are set to stretch, reprint on overflow, or anything else I can
think of. I have put colored shapes set to stretch with parent, reprint on
overflow in all bands, and on the second page, none of the shapes appear.
There is one group on detail band, both the header and footer are phDynamic,
and there is a sub report in the group footer. Within that subreport it has
a title and summary, with one more sub report in the detail band. The
subreports are very simple, running from JIT pipelines.

So what else can I do to get the summary to not reprint? It is printing
fine on the first page, but then reprinting on the second page by itself
when there are about 14 detail lines. It should only print once.

Jim

Comments

  • edited October 2004

    1. Make sure that you do not have any event-handler code that manipulates
    the dataset in any manner while the report is executing.

    2. If you are dynamically controlling object visibility, loading memo's etc,
    make sure you use Band.BeforePrint rather than Band.BeforeGenerate

    3. Try downloading a trial version of the latest release, RB 7.04 and
    perform the same test.

    4. If you would like to create a minimal example that we can run here, email
    in zip format to support@digital-metaphors.com and we can check it out.
    Please use only standard Delphi components and RB.


    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2004
    1. I was doing a .next on the detail dataset in one place, but reworking
    that to be a where clause on the sql didn't seem to help.

    2. I only control one band's visibility, that is the group header, with the
    code below in the BeforePrint event. Taking this out of the picture doesn't
    fix the problem. Other than that band, I control the visibility of some
    regions and labels, they are on or off for the report.

    if report.AbsolutePageNo > 2 then
    ppGroup1.HeaderBand.Visible := (report.DetailBand.Count > 0);

    3. I'll work on it.

    4. I'll work on it.

  • edited October 2004


    Anything you do to the dataset needs to done prior to calling Report.Print.
    The report engine initializes the datapipelines for all reports/childreports
    at the very beginning. If you need to do manual master/detail then you can
    try using the OnRecordPositionChange event for the master pipeline to modify
    the detail.

    the
    doesn't

    Ok, but not sure I understand that code. I think DetailBand.Count resets
    each time the group breaks. Or are you trying to do something like
    Group.ReprintOnSubsequentPage := False?




    --

    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2004

    reworking
    Report.Print.
    reports/childreports
    modify

    That is the event in which I was restricting which detail lines would print.
    But in reviewing it, it made more sense to handle the restriction as a where
    clause. So now that code is removed and it can't be the problem.


    This code keeps the group header from printing on a page where there are no
    detail lines, but I took it out too and it didn't help the reprinting of the
    summary band problem.
  • edited October 2004

    Ok. Try saving the report under a new name and then continue to
    incrementally simplify it until the summary band starts to print properly.


    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.