Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Leading Zeros? 1

Status
Not open for further replies.

Yustrn

Instructor
Jun 19, 2002
42
US
How do I place a formula to enter in leading zeros on a number for instance I need to hold 10 places so

101 should be 0000000101
1001 should be 000000101
10001 should be 0000010001
so no matter what the number is I need 10 fields and the fields should be leading zeros. This is using Crystal 10

Thanks!
 
Use:

totext({table.number},"0000000000")

-LB
 
If the datatype of your field is a number, then use lbass's solution.
If your field is already a text, you can do something like this:

right(replicatestring("0",10) & {table.field},10)

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top