Subreport not printing when no data exists
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
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
This discussion has been closed.
Comments
be set to BlankReport.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
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
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
http://www.digital-metaphors.com
info@digital-metaphors.com