>I have a need to display a numeric field on the report with options to have no decimals, 2 decimals, 3 decimals or more.
>Currently I'm using the format mask in the field expression to do this but unable to put a iif() condition on the format mask to dynamically change the format mask based on a public variable to decide on how many decimal points the format mask should have.
>
>Is there a way to do this?
>
>Thanks in advance.
>Yau
Change the report field expression to be character and delete the format expression. Instead, set the field expression to something like this:
TRANSFORM(YourNumber, ICASE(FirstCondition=.t., '999.999', SecondCondition=.t., '9999.99', ThirdCondition=.t., '99999.9', '999999'))