Search code examples
sqlcrystal-reportshanasapb1

SUM results is multiplying by number of rows


I'm creating a crystal report from several tables.

One table has fields that I want to have sum totals on, but these sum fields are being distorted by number of rows from another table. There are no fields other than DocEntry that I can link with between the two tables.

Here, total bales is repeating 4 times:

Field duplicated

If I sum the field total bales, instead of showing 12 the result is 48:

wrong sum results

Please assist.


Solution

  • Insert a Group on DocEntry.

    Add a Running Total that sums Bales but evaluates only on change of group.