Zeros to the left of number (resolved)

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hi!

I have a int field in the database and when to open the report,  I like to complete with zeros to the left (maximum 6 numbers).

Example:  number 1 ->  000001
               number 20 ->  000020

which formula to use?

Thanks.


Edited by Zamparo - 22 Apr 2009 at 8:40am
right(("000000" + totext({table.numberfield},0,"")),6)
 
Note that this is now a text field and no longer numeric.


Edited by DBlank - 22 Apr 2009 at 7:16am
Originally posted by DBlank

right(("000000" + totext({table.numberfield},0,"")),6)
 
Note that this is now a text field and no longer numeric.


Excellent!!
Thank you very much!