Print Page | Close Window

How to format a number in a formula string

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14872
Printed Date: 24 Apr 2024 at 12:38pm


Topic: How to format a number in a formula string
Posted By: dlabrec
Subject: How to format a number in a formula string
Date 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



Replies:
Posted By: yggdrasil
Date Posted: 07 Nov 2011 at 2:49am
totext( mailto:%7b@pcode%7d,0 - {@pcode},0 ,"") & " " & mailto:%7b@pname - {@pname }


Posted By: dlabrec
Date Posted: 07 Nov 2011 at 5:11am
That worked perfectly! Thank you so much!



Print Page | Close Window