Click here to Skip to main content
15,885,890 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear,

I am building a report using report builder 2.
let say the data from my query is look like below:

SQL
Select membershipid,billamount,transactionAmount
From  membership m inner join bill b on b.membershipid=m.id
left outer join transaction t on t.billId=b.id

MembershipId(membership Table) billAmount(bill)  TransactionAmount (transaction)
1                              100                   20
1                              100                   20
1                              100                   50
1                              100                   10
2                              50                    10
2                              50                    10 
2                              50                    20


when I used the row group in report builder on membershipId then add Total group
,report output is like this:
1                             400                  100
2                             150                  50


I want to see this output:
1                             100                  100
2                             50                   50



why this happen?and What should I do؟
Posted
Updated 14-Sep-12 10:07am
v2
Comments
Kuthuparakkal 14-Sep-12 3:07am    
Can you fix it in your Query ?

1 solution

The only way to achieve that is to change a query:
SQL
SELECT membershipid, billamount, SUM(transactionAmount) AS transactionAmount
FROM  membership m inner join bill b on b.membershipid=m.id
left outer join transaction t on t.billId=b.id
GROUP BY membershipid, billamount
ORDER BY membershipid, billamount

and remove groupping in the report.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900