Click here to Skip to main content
15,743,299 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi there,

in crystal report i have a filed with name country which display countries name.
like.......

India
America
Australia

now i want only first three characters in reports.
like.......

Ind
Ame
Aus


thanks.
Posted

1 solution

drag drop your country field on report

open property by right click that field -> Format Object
on that page at below you will see display string and a button x+2
click that button and put below formula in editor
YourCountryField=> select it from Report Fields -> your contryname field
e.g. {Table.CountryNm}

MID(YourCountryField, 1,3)

Happy Coding!
:)
 
Share this answer
 
v2
Comments
Aniruddh Bhatt 19-Sep-12 1:08am    
thanks, it works.
Aarti Meswania 19-Sep-12 1:09am    
welcome, Glad to help you! :)

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