Hi
I have a field on a report that is text that I want to have leading zero's.
The text is always a number and I want it be be a maximun of 3 charaters.
e.g
if the text = 4, it should print/display 004
if the text = 52, it should print/display 052
if the text = 152, it should print/display 152
If tried FORMAT(qtytext,0,'<TEXT,3><Filler Character,0>') but it adds the zero to the end.
How do I get it to have leading zero's
Thanks
0
Answers
you could try this.
Albert
It worked a treat! Thanks...
If i didn't want a blank/zero value to be formated as 000, would i do something like this in a Report Sourceexpr?
if text='', then text else PADSTR('',3 - STRLEN(Text,'0') +text;
You could create a function in your report and use that function as the SourceExpr.
SourceExpr MyFunction(Text)
Albert
Object Manager
All suggestions were great!