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

Adding Running Total

Status
Not open for further replies.
Sep 16, 2005
191
US
I have a field call TotalAmount. It adds all the running total fields together and display a sum of the total.

Here is my formula for the @TotalAmount:

{#CalAmt}+{#RiskAmt}+{#AdminAmount}

The problem:
Some of the field are blank, example:{#RiskAmt}. Therefore, my TotalAmount is blank. What can I do to my formula so that it will only add those with value in the field?

Here is the layout of my report:

GroupFooter:
{#CalAmt} {#RiskAmt} {#AdminAmount} {@TotalAmount}

Example data:
$24.00 (blank) $100.00 (blank right now)

Correct data should display like this:
$24.00 (blank) $100.00 $120.00

I am using Crystal 10.
 
Your Total Amount formula should be:

WhilePrintingRecords;
{#CalAmt}+{#RiskAmt}+{#AdminAmount}

Cheers
paulmarr
 
Change the formula to:

(
if isnull({#CalAmt}) then 0 else {#CalAmt}
) +
(
if isnull({#RiskAmt}) then 0 else {#RiskAmt}
)+
(
if isnull({#AdminAmt}) then 0 else {#AdminAmt}
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top