Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
I have a field name serial number whose datatype is nvarchar(25).
As i am entering data from front end as 0001 as serial number.

data is getting saved in database as 0001 but when i am trying to print it in crystal report from database. its coming as 1.

How do i make the change? As i want it to be printed the same way as it is there in db as 0001

can anyone please help me.

I have seen many posts in google. All are suggesting to make '000' as string and totext function to use.

I dont want to make the ultimate result as a string.

As it might happen that i might enter some serial numbers as 001 or 0001-2 or OOO24-2
like this.

Thanks
Sudeshna
Posted

Go to the element, right click, select Formatting and change autoformat to text. I don't have CR in front of me so I cannot give exact step by step, but it shouldn't be hard to find based on this.

If this helps please take time to accept the solution. Thank you.
 
Share this answer
 
 
Share this answer
 
Comments
sudeshna from bangkok 12-Feb-15 5:23am    
I solved it myself. i just refreshed my data source. Thanks

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