Avoid subreport printing when no data
Hi,
I have a main report with 2 subreports with PrintBehaivor=pbSection.
Each subreport has is own piepline that is master/detail with main
report pipeline.
I want that if, for a record in main report pipeline, I don't have
detail records in some of subreport pipeline, this subreport don't
prints, but it prints a balnk page.
How can I avoid this?
I have a main report with 2 subreports with PrintBehaivor=pbSection.
Each subreport has is own piepline that is master/detail with main
report pipeline.
I want that if, for a record in main report pipeline, I don't have
detail records in some of subreport pipeline, this subreport don't
prints, but it prints a balnk page.
How can I avoid this?
This discussion has been closed.
Comments
Which version of ReportBuilder are you using? An issue similar to this was
addressed for RB 11.05.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Report Builder Enterprise Edition 7.03
I do not believe this will work in RB 7.03. One option would be to try to
manually check to see if any detail records are available for a given master
record then toggle the Visible property of the subreport. Note that I have
not tested nor can I test this with RB 7.03.
Another would be to download a trial copy of RB 11.05 and test with that.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Hi Nico,
I have achieved it with this line at OnPrint event for each subreport:
procedure TcxReportMasterForm.ppSubReportOnPrint(Sender: TObject);
begin
(Sender as TppSubReport).Visible:=
not (ppdaNoRecords in (Sender as ppSubReport).DataPipeline.State);
end;
Thank you!