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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fixed length field in Crystal Reports v10 1

Status
Not open for further replies.

lymi6977

IS-IT--Management
Jan 14, 2005
16
US
Is there a way to make a numeric field, i.e. 1234.56, to always have a fixed length of 12 with leading zeros?

1234.56 to be 000000123456

Any help is greatly appreciated!
 
Are there always two decimals? If so, you could use:

totext({table.number}*100,"000000000000")

-LB
 
If the decimal varies, or just to be safe, try:

totext(replace(totext({table.number},0,""),".",""),"000000000000")

-k
 
Oops should be:

totext(replace(totext({table.number},4,""),".",""),"000000000000")

The 4 is the number of max decimals.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top