Formating numerik value as to be pozitif or negati
How can show n??meric value with MemoView by changing its DisplayFormat?
When the value pozitif the value will be like that
2.3443,33 [P]
when it s negative it will be like that
2.3443,33 [N]
and when its zero it will be like that
[Z]
Is it possible doing that with one FormatStr.
Thanks for help
When the value pozitif the value will be like that
2.3443,33 [P]
when it s negative it will be like that
2.3443,33 [N]
and when its zero it will be like that
[Z]
Is it possible doing that with one FormatStr.
Thanks for help
Comments
write code in obp of band to test datafield value and place appropriate text in the second memoview.
for Display format=
#,###.#0[P];#,###.#0[N];[Z]
if this works it will be more smart
%2.2n[P];%2.2n[N];[Z]
but doesnt supported.
[FormatFloat('#,###.##[P];#,###.##[N];[Z]', <frxDataSet1."anumericfieldname">)]
Tuna is correct
you can also alter the display format formatstring, without using the function.
ie set display format to number select the last item it will display %2.2m
delete this value and enter your format string without the ''s
ie:
#,###.##[P];#,###.##[N];[Z]
if you want decimal places to show at all times use 0 in place of # in decimal positions
#,###.00[P];#,###.00[N];[Z]