Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: How to format a number in a formula string Post Reply Post New Topic
Author Message
dlabrec
Newbie
Newbie


Joined: 03 Jun 2008
Location: United States
Online Status: Offline
Posts: 20
Quote dlabrec Replybullet Topic: How to format a number in a formula string
    Posted: 04 Nov 2011 at 10:55am
I have a formla: {@pcode} & " " & {@pname}

Where @pcode is a number, a facility number and @pname is the facility name. I want the formula to show the facility number (with no decimal point or comma) a space and then the facility name.

So on the report is showing: 1,053.00 DSI TEMPE

I want it to show: 1053 DSI TEMPE

I can't right-click on the value and format as a number.

How can I eliminate the comma and decimal point and zeros?

Thanks
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 07 Nov 2011 at 2:49am
totext({@pcode},0,"") & " " & {@pname}
IP IP Logged
dlabrec
Newbie
Newbie


Joined: 03 Jun 2008
Location: United States
Online Status: Offline
Posts: 20
Quote dlabrec Replybullet Posted: 07 Nov 2011 at 5:11am
That worked perfectly! Thank you so much!
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.043 seconds.