views:

11

answers:

1

I am trying to format a number field to display in this particular way 0001234, i can do it in VB using the Format(right command, but crystal basic doesn't recognise 'Format'

+1  A: 

This Crystal formula will add 0s to the left of the number until it is 7 digits long. The cstr() is there to get rid of the decimal and the characters to the right of the decimal:

Right("0000000"&
cstr({Field},0,"")
,7)

I recommend putting this formula in the display string of your field.

PowerUser