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

Formatting Currency Display 1

Status
Not open for further replies.

FrequentUser

Technical User
Aug 24, 2006
17
US
So I searched through past threads and didn't find an answer to this question.

I have several Running Totals which calculate the declared value of work to be performed for building permits, sorted by month.

Running Total Name: JulyRes [July Residential]
Field to Summarize: {APBLDG.DECLVLTN}
Type of Summary: Sum
Evaluate on: Formula
Month({APBLDG.ISSDTTM}) = 07 and
{@Res v Non-Res} = "RESIDENTIAL" AND
NOT({APDEFN.APTYPE} IN ["APPLIANCE", "ELECTRIC
C", "ELECTRIC R", "ELEVATOR", "LOWVOLTAGE", "MECH/GAS
C", "MECH/GAS R", "PLUMBING C", "PLUMBING R"])
Reset: Never

The returned values are always in the millions.

$83,000,000

However, I would like to only display

$83 (with a millions label to the side)

Does anyone know how to format a number field for this.
I can round to a million, and I have tried other formulas in Format Field > Rounding formula option:

if {#JulyRes} > 1000000 then
Left(ToText({#JulyRes}), 2)

but when refreshing I get error: "Bad formula result."

HELP please.





Crystal Reports XI, MSSQL 2000, ODBC
 
I think you should just use a formula:

{#JulyRes}/1000000

-LB
 
Yeah that seemed like the obvious choice, only thing is I have about 7 separate running totals for all 12 months

I was trying to avoid all that extra work of creating individual formulas for each running total.

I think I will try to redo the entire report with grouping options

Thanks anyways.

Crystal Reports XI, MSSQL 2000, ODBC
 
The other thing you might try is to select each running total->format field->common->display string and use a formula like:

totext(currentfieldvalue/1000000,0,"")

Not much simpler though.

-LB
 
Thank you so much that worked!
I know mind copying and pasting into each format field.

What exactly does the 0 and the "" stand for? just curious.

Crystal Reports XI, MSSQL 2000, ODBC
 
The 0 says no decimals, and the "" says no thousands dividers.

-LB
 
thanks. It was easier than I thought. I just selected all the running totals and put the formula in for all at one time.

Crystal Reports XI, MSSQL 2000, ODBC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top