cancel
Showing results for 
Search instead for 
Did you mean: 

Leading '0' removed from field

Former Member
0 Kudos

Hi,

I am linking a Crysta Report to an Excel spreadsheet and displaying the information. I am trying to display a field on the page that looks like 0810911071309. In the spreadsheet the format of this is "Custom" and 0000000000000. However, when I try and display this in my report the leading 0 from 0810911071309 is taken off.

Can anyone help me?

Thanks in advance

Aled

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When crystal connects to Excel it ignores any excel formating and derives its data type from the first field it finds.

Thus crystal will treat your data as a number.

To restore your formatting use a formula

totext(yourexcelfield, "0000000000000", 0, "")

Replace field on design view with the above formula.

Ian

Answers (0)