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

Empty preview - If empty SubReport in detail band

edited March 2005 in General
Hi All!

I have report with next structure:
Master-detail queries and
main report with simple detail DBLabels and subreport on detail band
with some details (Fixed size) of record.
I have next problem: if subreport has no record I get empty page
on Preview

How to show the report even though subreports has no records?

Regards,
Nikolai Bochkarev

Comments

  • edited March 2005
    Hi Nikolai,

    You need to change the Report.NoDataBehaviors property to ndBlankReport for
    your subreport. This should allow other objects to appear even if there is
    no data retrieved.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2005
    > You need to change the Report.NoDataBehaviors property to ndBlankReport
    for
    is

    SubReport1.NoDataBehaviors = ndBlankReport ?

    In this case I see on Preview Header, Title, Detail with lines
    but don't see on Detail band DBTexts with data of Main Datapipeline.

    I'm solve this task another way:

    On main report RAP code

    DetailBeforeGenerate:

    if Query2DataPipeLine.BOF and Query2DataPipeLine.EOF then
    SubReport1.Datapipeline := nil else
    SubReport1.Datapipeline := Query2DataPipeLine;

    And in Repoprt Designer set Datapipeline of SubReport1 on Empty (<- without
    this does not work!)

    Regards,
    Nikolai Bochkarev
This discussion has been closed.