Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am fetching some data from Database, i have a number field.
I need to dislay Leading Zeros for that field.

Suppose it fetches 95 from database, it should Display 0000095 while showing Report.

I Tried many Ways,
FORMAT(FIELDA,"000000000") but formula editor returns error Boolean value is required.

Right("000000000"&FIELDA,9)
Same error is returned.


Please Suggest solution

Prathamesh
Posted
Updated 24-Nov-11 5:31am
v2

Try a format specifier of all 9s. E.g. "99999999".
 
Share this answer
 
Convert your field to string, so formula should be like below
Right("000000000" & CStr(FIELDA),9)

There is an option Show Leading Zero[^] in Formatting Numbers dialog box[^]

Also check this for formula(leading zero)
Crystal Reports: Missing Data[^]
 
Share this answer
 
For Display String in the Format Editor for a 5 digit int Zip code CStr({Payee.Zip},"00000",0)

http://pic.dhe.ibm.com/infocenter/rsawshlp/v7r5m0/index.jsp?topic=%2Fcom.businessobjects.integration.eclipse.designer.doc%2Fhtml%2Ftopic727.html[^]

"00000" is the format, 0 is the number of decimal places.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900