Convert number to a padded string in crystal reports

qcao

New Member
I am using crystal reports for reporting. I have a small problem, actually I have a field call \[code\]{id}\[/code\] on my report that is bound to an identity of my sql table. It shows values like 1,2,3,4 but I want my values to be padded with zeros on left to make it 7 digits in all. Ex- 0000001,0000002,0000003,0000004, and for 1234 it should be 0001234.I tried \[code\]Right("0000"&{MyFieldToPad},7)\[/code\] but its not working, it says it need boolean!
 
Back
Top