Page break not working in trsClientReport (D6.02rb10)

edited October 2006 in Server
Hi,

Please help with an unexpected result when using the tppPageBreak control.

I am using the tppPageBreak control in a report and conditionally set
visible true/false depending on report data. When this is run in the design
environment the page break behaves as required. When run in our application
using the report server and trsClientReport the page break does not behave
in the same way. Specifically it is not turning off when it supposed to ie.
it seems to be ignoring the tppPageBreak.Visible = false.

I have attach my event code below and as you can see when I have a document
of type 'Quotation' the page break should not be effected but it is.

Is there some other property that I should be using to suppress a page break
or is there some setting in the server that I have overlooked?

Thanks,
Dave.

procedure ReportBeforePrint;
begin
{Show totals as appropriate}
regConfTotals.visible := false;
regQuoteTotals.visible := false;
regLetter.Visible:= false;
pgbLetter.visible := false;
regAddress.Visible := false;
pgbPaymentForm.visible := false;
regPaymentForm.Visible := false;

{Turn on regions and page breaks as required}
if V_DOC_ITINERARY_1['DOC_TYPE'] ='Quotation' then
begin
regQuoteTotals.visible := true;
regAddress.Visible := true;
end;
if V_DOC_ITINERARY_1['DOC_TYPE'] ='Confirmation' then
begin
regConfTotals.visible := true;
regAddress.Visible := true;
end;
if V_DOC_ITINERARY_1['DOC_TYPE'] ='Final Confirmation' then
begin
regConfTotals.visible := true;
regAddress.Visible := true;
regPaymentForm.visible := true;
end;
if V_DOC_ITINERARY_1['DOC_TYPE'] ='Itinerary' then
begin
pgbPaymentForm.visible := true;
regLetter.visible := true;
end;
end;

Comments

  • edited October 2006

    - for testing, try creating a simple project that can run the report in a
    standard Delphi project (i.e. using TppReport.Print). The report should
    behave the same way on the server.

    - for testing, try adding a Label to the report and at the bottom of the
    ReportBeforePrint code, set the Label.Caption

    if pbpPaymentForm.Visible then
    myLabel.Caption := 'BeforePrint event: page break visible'
    else
    myLabel.Caption := 'BeforePrint event: page break not visible'


    - is V_DOC_ITINERARY_1 a datapipeline? Does it contain only a single record?

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.