Hi,
I have to provide a report to my company's VP. The data in the table, against which I have to generate the report, is like this:
invoice# customer# amount
ABC 9999 123
ABC 4567 123
DEF 5678 100
DEF 5678 100
XYZ 4567 300
XYZ 6789 400
I have to display the data in the report like this:
customer# invoice# amount
4567 ABC 246
4567 XYZ 700
Total:- 946
5678 DEF 200
Total:- 200
The logic which I am using is:
1. First do a group by on invoice#
2. Then select the minimum account number and sum of amounts
3. Do a sort on customer account number
After this the data in the report looks like following
customer# invoice# amount
4567 ABC 246
4567 XYZ 700
5678 DEF 200
But I am not able to provide the summary by account numbers, because I haven't done a grouping on account number.
Any pointers rearding this will be of great help.
Thanks,
Nikhil
I have to provide a report to my company's VP. The data in the table, against which I have to generate the report, is like this:
invoice# customer# amount
ABC 9999 123
ABC 4567 123
DEF 5678 100
DEF 5678 100
XYZ 4567 300
XYZ 6789 400
I have to display the data in the report like this:
customer# invoice# amount
4567 ABC 246
4567 XYZ 700
Total:- 946
5678 DEF 200
Total:- 200
The logic which I am using is:
1. First do a group by on invoice#
2. Then select the minimum account number and sum of amounts
3. Do a sort on customer account number
After this the data in the report looks like following
customer# invoice# amount
4567 ABC 246
4567 XYZ 700
5678 DEF 200
But I am not able to provide the summary by account numbers, because I haven't done a grouping on account number.
Any pointers rearding this will be of great help.
Thanks,
Nikhil