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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Numeric Text to Dollars

Status
Not open for further replies.

szeiss

Programmer
Apr 5, 2000
137
US
I'm using CR 8.5. I have a formula that displays the value without any decimals when table.rpt <> 4. When table.rpt equals 4 then I want to see the decimal places. The code below works, BUT I need to add the dollar sign in the first instance, but so far no luck. Both of these fields are numeric.

Code:
If {table.RPT} <> 4 Then
  ToText({table.ACTUALS}, 0)
Else
  ToText({table.ACTUALS}, 2)


Thanks,
Sherry
 
You might try concatenating the dollar sign to your first value:

Code:
If {table.RPT} <> 4 Then
  "$"&" "&ToText({table.ACTUALS}, 0)
Else
  ToText({table.ACTUALS}, 2)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top