Home General

displayformat question

edited August 2011 in General
Hi

I got a dbcalc and it's working. Thanks.

If I have a table with two columns (wt, cost), I set a variable (pV)
with the onCalc event:

Value := pItem['wt'] * pItem['cost'];


How do I set the display format to be ###.00?


Without any formatting it displays :

wt cost total
5.15 294 1514.1
0.48 6240 2995.2
0.21 4300 903.
0.00 0 0 .
0.00 0 0 .
0.00 0 0 .
0.00 0 0 .
0.00 0 0 .
5412.30

With displayformat = '####.00':

I get the same thing.

I can set the right displayformat for the variable sum, but
it doesn't seem to like me setting the display format during
the calculations.

Any help appreciated.

Edmund

Comments

  • edited August 2011
    In my testing setting the DisplayFormat of a TppVariable set to
    calculate on each traversal gave the correct output. Are you certain
    you have the variable's type set correctly?

    Try setting the DisplayFormat := '0.00' and see if that makes a difference.

    Best Regards,

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