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

Report Formatting Problem

Status
Not open for further replies.

Shanachie

Programmer
Jun 18, 2000
92
US
Client wants report to show dollar amounts like: 123.45

For detail bands, I've used: str(value,10,2)

For group summary bands, how do I show the totals in that format? If I calculate group sum on str(value,10,2), I get stars.

If I use the "currency" format, I get: $123.4500

How can I force it into the format I want?


TIA,
Shanachie


 
You don't want to calculate on str(). Adding the following:

STR(123.45, 10, 2) + STR(123.45, 10, 2) +STR(123.45, 10, 2)
doesn't result in:
370.35
it results in:
123.45 123.45 123.45

Which will give you stars because it is an invalid number.
Calculate the value, then if you really need to you can display it with the STR() function.
Dave S.
[cheers]
 
In the report expression dialog box that comes up put VALUE in for the expression and $$99,999,999.99 for the format. there is no reason to use the str(value,10,2) in the detail band, group band, or summary band Slighthaze = NULL
 
Calculate the group sum into a report variable and then you can still use the Str() or trans() in the group band to display the value in whatever format you want.
 
Thanks, SlightHaze, that was what I was looking for.

"SlightHaze"? What a great handle!

Shanachie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top