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

Avoid subreport printing when no data

edited July 2009 in Devices
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?

Comments

  • edited July 2009
    Hi Jose,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2009
    Nico Cizik (Digital Metaphors) escribió:
    Report Builder Enterprise Edition 7.03
  • edited July 2009
    Hi Jose,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2009
    Nico Cizik (Digital Metaphors) escribió:

    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!
This discussion has been closed.