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

Subreport missing but not on all records

edited July 2012 in General
We've got an odd problem happening.
We have a very complicated report which consists of a main report with
50+ sub-reports each one is loaded at runtime with reports that are
designed in their own datamodule. Each of the subreports are shifted
relative to the one ahead of it so that they don't overlap each other,
and if no data is found for that report the next one in line can print
in it's place. The individual reports will be defined by their own
query using a DBPipeline (assigned at runtime), however the contents
within are populated from xml files contained within each record of the
query. This is controlled by JITPipelines. The recordcount of these
are set in the DBTraversal of the DBPipline for the query. There can
be several subreports within these individual reports each one
controlled by a separate JITPipeline.

The problem is that occasionally one of the subreports under these
individual reports will come up missing. We've set breakpoints and
watched the JITPipline.recordcount get set to the correct number of
records within the xml. It doesn't happen all the time; however, once
it does it will always happen in that one place every time unless new
data is shifted ahead of it. In fact if we change which reports print
ahead of it (we can do this by filters at runtime) this causes the
records to not be in the same physical place on the report and the
subreport might show up then. However, other subreports can come up
missing.

We've played around with keeptogether settings adding regions and many
other settings but nothing seems to keep it from occasionally
occurring. I decided to try setting the passsetting to two pass to see
if it would help and I saw something interesting. When the report ran
the first page showed up and I could see all the subreports that were
supposed to show up, However, as the report finished calculating the
remaining pages, the report flickered and right before my eyes one of
the subreports disappeared.

We are at a loss as to what to try next. Any help would be appreciated.

Delphi 7
Report Builder 10.09 ent

Thanks,
Rick

Comments

  • edited July 2012
    Hi Rick,

    We have not heard of anything like this before. My initial guess is
    that this is some sort of timing issue however RB 10 is fairly dated and
    we have made many fixes since then so upgrading may help.

    My first suggestion would be to try to simplify this report as much as
    possible. Minimize or remove all event code and reduce the number of
    subreports to a minimum. Perhaps then it will be easier to see what is
    actually happening.

    I'm going to have to see this on my machine with a simpler example in
    order to track down any issues myself. If you are able to recreate this
    with a simple example, please send it to support@digital-metaphors.com
    in .zip format and I'll try it with the latest version of ReportBuilder.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.