# Padding Numbers with Zeros in Crystal Reports

http://bit.ly/14SOGXc

:-)

*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*

On Fri, Jul 5, 2013 at 4:45 PM, clederer@... <
clederer@...> wrote:

> **
>
>
> Ideally, I'm writing a template for the template of a check.
> The check number needs to be 8 digits with zeros leading the field, then
> the check number
>
> x = any number (Fixed number of 8 digits, cant be less or greater)
>
> If Length of X is less than 8, pad the required amount of 0's in the front
> to make its length 8. Result should also be a number and not a string.
>
> Eg:
>
> X = 123
> Result of Formula should be 00000123
>
> X = 9
> Result of Formula should be 00000009
>
> Does anyone know how to do this in Crystal Reports? Right now there are no
>
>
>

[Non-text portions of this message have been removed]
Ideally, I'm writing a template for the template of a check.
The check number needs to be 8 digits with zeros leading the field, then the check number

x = any number (Fixed number of 8 digits, cant be less or greater)

If Length of X is less than 8, pad the required amount of 0's in the front to make its length 8. Result should also be a number and not a string.

Eg:

X = 123
Result of Formula should be 00000123

X = 9
Result of Formula should be 00000009

Does anyone know how to do this in Crystal Reports? Right now there are no zeros leading