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!

Text/Numeric Field Question

Status
Not open for further replies.

excalibur78

IS-IT--Management
Jan 3, 2001
66
US
How can I get this formula to work? The Sum in the else part needs to be a number or somehow need to display it as a number formated to look like money. (EX: $1,000.00)

If {@ArrayCount} < 2 Then

&quot;&quot;

Else

Sum ({SOLine.SlsPrice}, {@Group2})
 
you can do 1 of 2 things...you can write the formula as you are but convert the amount to text:
If {@ArrayCount} < 2 Then
&quot;&quot;
Else
totext(Sum ({SOLine.SlsPrice}, {@Group2}))

OR
you can write the formula like this:
If {@ArrayCount} < 2 Then
0
Else
Sum ({SOLine.SlsPrice}, {@Group2})

and then format the field to suppress 0's (right click, format, number tab, suppress if 0
 
Dear Excalibur 78,

Have you tried creating a formula for the sum portion ({@sumsales}) and then in the formula you showed above:

If {@ArrayCount} < 2 Then

&quot;&quot;

Else

&quot;$&quot; & Totext({@sumsales},&quot;#,###,###,###.00&quot; ) Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top