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

TppVariable.OnPrint in combination with LookAhead

edited July 2007 in General
Hi,

In my report I use a TppVariable to sum a value. This value is printed in a
group header so I set LookAhead to true. This variable should only be
printed when the calculated value is greater than 100. I implemented in RAP
an OnPrint eventhandler containing:

procedure Variable3OnPrint;
begin
if Variable3.Value > 100
then Variable3.Visible := True
else Variable3.Visible := False;
end;

This doesn't seem to work because it fires before the final summary is
calculated.
How can I accomplish above scenario so the variable is only printed if it
contains a value > 100.

Using RB 10.06 Ent, D7.

Regards,
Jeroen R?ttink

Comments

  • edited July 2007
    Here is an example of accessing and using the look ahead value in a report

    www.digital-metaphors.com/tips/UseLookAheadValueInCalc.zip

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2007
    Hi Nard,

    But TppVariable doesn't seem to have a GetLookAheadValue() method.

    Regards,
    Jeroen.

  • edited July 2007
    Nard,

    Do you have some other options?

    Regards,
    Jeroen.

This discussion has been closed.