Write your own UDF.
First, replace all "0" with space, use alltrim(), and replace space back to "0". That will clear unneeded zeroes at the end.
Then, you may want to conditionally add a zero to the left, to change ".53" to "0.53".
Finally, apply the special rules about the number of decimals which you mentioned.
HTH,
Hilmar.
>Hi guys...
>
>I have a field NUMERIC N (12,6) and this field is populate with some values. Example:
>
>
> 12.210000
> 145.245000
>1524.352000
> 1.3562400
> 15.2546423
>
>
>Ok... no problem here... but I have to print these numbers like that:
>
>
> 12.21000 -> 12.21
> 145.24500 -> 145.245
> 54.00000 -> 54.00
>1524.35200 -> 1524.352
> 1.356240 -> 1.35624
> 15.254642 -> 15.254642
>
>
>I'm using ??? Tran(MyField,"??????????") to print this report... and I have to print, at least, two decimals... but if the number has more than two decimals, I have to print them, until completed six positions.
>
>Any idea to change ??????? for a solution? :-)
>
>TIA!
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)