Home General

Subreport not printing when no data exists

edited October 2001 in General
Hi,

In my main report, I use a subreport for the "detail" section. The
subreport prints the detail line(s) and a group footer with a total count of
the items in the group. But if no detail exists, it does not print the
subreport at all. How can I make it print? I don't seem to have access to
the SkipWhenNoRecords property from the designer itself, but I did make sure
the "link" from the master to the detail records is set properly to include
all headers regardless of whether there is detail for them. It does print
the header for every group (in the main report), but it skips the subreport
if no detail exists. Any ideas?

-- Vinnie Murdico

Comments

  • edited October 2001
    There is a NoDataBehaviors property on the child report object which should
    be set to BlankReport.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited October 2001
    > There is a NoDataBehaviors property on the child report object which
    should

    Hi Jim,

    Is this property changeable in the Report Designer? If so where? I can't
    seem to locate it. The problem is that some users may want the subreport to
    print, others may not when designing their own reports, so I need to have
    this as an option in the designer, I can't simply hard-code it as a property
    setting in the app itself. Is this possible?

    Thanks,
    Vinnie Murdico
  • edited October 2001
    Adding NoDataBehaviors in the end user designer is on the todo list. You
    can provide this as a menu option in the designer. Open ppDsgner.pas to get
    the main menu component and recompile off your copy of our source.

    procedure TppDesignerWindow.BlankReport1Click(Sender: TObject);
    begin
    FCurrentReport.NoDataBehaviors := [ndBlankReport];
    end;

    procedure TppDesignerWindow.BlankPage1Click(Sender: TObject);
    begin
    FCurrentReport.NoDataBehaviors := [ndBlankPage];
    end;


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.