Search code examples
crystal-reports

How to make a sum of total for each id


Using Crystal report 7

I want to view the table 1 and sum of table2

table1

id name

001 raja
002 vijay
003 suresh
....

table2

id value

001 100
001 200
001 150
002 200
003 150
003 200
...

I want to display all the rows from table1 and sum(values) from table2. How to do this in crystal report

Expected Output

id name value

001 raja 450
002 vijay 200
003 suresh 350
................
           1000 (sum of value)

Note: I add the table field directly to the report, i am not added store procedure or views or query in the report.

How to do this.

Need Crystal report help


Solution

  • Try this it will work for you

    1) Add a Group in your crystal report i.e. by Name

    enter image description here

    2) Add a running total

    enter image description here

    enter image description here

    3) your report will be as follow

    enter image description here

    4) Your output will be

    enter image description here