displayformat question
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
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
This discussion has been closed.
Comments
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com