xorpower
xorpower

Reputation: 18963

Summation of a field in Crystal report

please refer to the link:

Crystal Report: Display 0.00 for duplicate values

In that question, i need to display sum as 250.00, but it come as 750.00

Let me know if any query.

thanks

Upvotes: 0

Views: 873

Answers (2)

codingbadger
codingbadger

Reputation: 43974

My mistake - as Arvo has stated you need to use a Running Total for this as the Sum functionality cannot evaluate a formula of this type.

Your Running Total should be setup similar to this:

Field to Summarize : {FieldName}

Type of Summary : sum

Evalute:

On Change of Field : {FieldName}

Reset:

Use a Formula

if PreviousIsNull ({FieldName}) then 
  {FieldName}
else
if {FieldName}=previous({FieldName}) then 
   0
else 
  {FieldName}

Upvotes: 0

Arvo
Arvo

Reputation: 10570

You need to use running total field - from problem description you have some one-to-many relationships, which multiply resulting rows (and 'normal' totals).

Upvotes: 1

Related Questions