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

Subreport disappears when 1 record has no detail data

edited November 2004 in Subreports
Hi, ran into a problem.

Have 2 master/detail relationships.

1: Master
2:Detail
3:Detail of the Detail

When for each 2:Detail record there are 1 or more detail records everything
seems ok. But when one of the 2:Detail records has no detailrecords all
level 3:Detail records "disappear". Eg. when displaying the records in a
preview I see the existing level 3:Detail records briefly until it comes to
the level 2:Detail then all the level 3:Details disappear. To make it
"murkier": when adding a ShowMessage('whatever'); in the BeforeGenerateEvent
of the level 2:Detail I get the appropiate number of messages and all the
existing level 3:Detail records stay on the screen (and can be printed). If
I remove the ShowMessage, all the level 3:Details are gone again.

Where can I start looking or better do you know what I'am doing wrong?

Willem Helder.

Comments

  • edited November 2004

    1. Check the linking relationships. There are two types of linking supported
    by ReportBuilder. Delphi TDataset linking and DataPipeline. These are
    mutually exclusive - you need to use one or the other. See article below.

    2. Make sure that you do not have any event-handler code that manipulates
    the datasets in any manner while the report is generating.

    3. For the detail datapipeline's you can set SkipWhenNoRecords to False if
    you want the master record to print when there are no corresponding detail.
    (This does not sound like your issue, but might be relevant in configuring
    the report to generate the desired output).


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



    Best regards,

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