Printing leading zero
Because my Runtime users do not have the privilege of attaching PDF's to an email (invoices, etc.), I have generated an invoice within an an email body, complete with a crap-load of ASCII text and calc fields. I have loaded this into a calculation container field and It work very well, generating an acceptable document for the sender that resembles an invoice.
However, the drawback is that any and all trailing zeros represented in a monetary calculation amount disappears and obviously makes for a rather sick looking document. I have even tried the resulting calculation pumping out a text format - no bloody way does it want to include trailing zeros in the output.
I have tried converting to text with functions that try to recognize a "0" through a multilevel case statement, or anything past the decimal point and of course if it ain't there in first place, it cannot see it, not even the decimal point.
PLEASE - any help?
Let ([ x = Round ( YourNumberFieldHere ; 2 ) ;
I = Int ( x ) ;
d = Mod ( x ; 1 )
I & If ( d ; Left ( d & "0" ; 3 ) ; ".00" )