Home RAP

changing variable in previous section

edited July 2008 in RAP
I am creating a report that in the header has a variable that holds the
total due. This is calculated by adding up all the amounts in the detail

If I create an event in the footer BeforePrint as:

TotalDue.Text := CurrToFmt(vTotalDue,1);

The TotalDue (just a lable) shows the amount from the Last record in the
first first record, the 1st record amount on the 2nd page and so on.

If I move the TotalDue down to the footer it works OK.

I think once the Header is printed, changing any data on that section
doesn't show up until the next page.

Does anyone know how to accomplish this?

In summary, I want to be able to change a label in the header with a value
from the detail section.



  • edited July 2008

    Try using a TppVariable or TppDBCalc with LookAhead set to True.

    For formatting use the component's DisplayFormat property.

    Nard Moseley
    Digital Metaphors

    Best regards,

    Nard Moseley
    Digital Metaphors
This discussion has been closed.