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

TppPageBreak.Visible does not seem to work

edited May 2015 in RAP
Using ReportBuilder 14.08 with Delphi2007

Placed PageBreak on Report. Set its visible property to FALSE.

Turned PageBreak.Visible := True, based on the "BeforePrint" Event of
the Details Band.

Was expecting to only see the page break when data met a specific criterian

RAP Code ( below ):

procedure DetailBeforePrint;
begin
RegionVoucher.Visible := (Rpt['RecordType']='2') and
(Rpt['TranLineEntryType']='GC');
VoucherPageBreak.Visible := RegionVoucher.Visible;
end;


Do not know what to do next.

Kind Regards,

Robert.

Comments

  • edited May 2015
    Sorry about this, looks like I was completely wrong ( as usual ).

    What I am trying to do is basically put a page break in at tun time, in
    the RAP code.

    still have not sorted it out.
  • edited May 2015
    Hi Robert,

    I performed a quick test with the latest version of ReportBuilder and
    was successfully able to add a PageBreak component to a report in RAP code.

    procedure ReportBeforePrint;
    var
    lPageBreak: TppPageBreak;
    begin

    lPageBreak := TppPageBreak.Create(nil);
    lPageBreak.Band := Detail;

    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.