Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pad string in crystal report 1

Status
Not open for further replies.

krish28

Programmer
Aug 5, 2011
3
GB
Hello ,

I am having problem to pad string in Crystal report.
Ex: I have a field like this :"6160-Rates and Rents".

I need to get only "Rates and Rents". How can i do this?

Thanks
 
krish,

If the desired text always follows the hyphen ("-"), the following should return what you seek:
Code:
mid({YourField},instr({YourField},"-")+1)

Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Hello mike,

It is working internally. But in preview screen its showing same old values(6160-Rates and Rents) . And when i put my cursor on any row in preview tab its showing the exact output ." Rates and Rents"

Please find sample example attached to mail.

Thanks
krish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top