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

Formatting Variables Output

edited August 2003 in General
How do you format a variable? I have created a new variable as follows:
if Gltrans['Amount']>0 then

begin

variable3.visible:=true;

Value :=Gltrans['Amount'];

end else

begin

if (Gltrans['Amount']<=0 then

begin

value :=0

end else

begin

variable3.visible:=false;

value:=0;

end;

end;

However, when I right click on the variable in the design tab, and selet
'format', I only get date/time options rather than currency options.

Any advice would be appreciated.

Best regards, Mike Champion.

Comments

  • edited August 2003
    Hi Mike,

    You need to change the TppVariable.DataType to dtCurrency. This can be done
    using the Delphi ObjectInspector, by using the DataType pull down menu at
    the top left of the Report Designer or at runtime in code. Once you set the
    correct datatype, the display format options will change to different types
    of currency formats.

    --
    Best Regards,

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