Announcements
 Crystal Reports Forum : General Information : Announcements
Message Icon Topic: Special char Post Reply Post New Topic
Author Message
patil
Newbie
Newbie


Joined: 19 Apr 2010
Online Status: Offline
Posts: 16
Quote patil Replybullet Topic: Special char
    Posted: 09 Jun 2010 at 12:26am
Hi All,
 
 in my report one column is ther i.e. phone number=1234567898
i want answer in my report as: phone number=123-456-7898
how to get this answer... plz help me out ASAP
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 09 Jun 2010 at 1:57am
Hi
Create the following formulas
 
1)
Left3-
left(replace(cstr({@char}),',',''),3)+'-'
 
2)Mid3-
replace(Mid(cstr({@char}),5,4),',','')+'-'
 
 
3)Right4-
Mid(replace(cstr({@char}),',',''),7,4)
 
4)Combine
 
Replace @char with your {table.phonenumberfield}
 
Cheers
Rahul
IP IP Logged
patil
Newbie
Newbie


Joined: 19 Apr 2010
Online Status: Offline
Posts: 16
Quote patil Replybullet Posted: 09 Jun 2010 at 5:47pm
Thank you so much...
its works...
IP IP Logged
patil
Newbie
Newbie


Joined: 19 Apr 2010
Online Status: Offline
Posts: 16
Quote patil Replybullet Posted: 11 Jun 2010 at 1:26am
but i want all these 4 formulas to be written in one formula... how to do???
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 11 Jun 2010 at 5:25am
Expand each one of the formulas into the last statement.
trim(left(replace(cstr({@char}),',',"),3+"-"+replace(Mid...., etc.
 
Hard to read, but possible. 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.032 seconds.