Sum and Group by
Sum and Group by
(OP)
I want to add a formula to my report that calculates the sum of a premium.
Ex:
PolicyNumber Riesgo Bank Premium
123 1 1 50
123 1 2 50
In the table these are two independent records one of them have 30 in the premium and the other one has 20, so the sum is 25.
In sql I do this query:
Select sum(premium) as premium from xxx group by policynumber, riesgo.
But I don't know how to do that in Crystal Reports.
Thanks.
Ex:
PolicyNumber Riesgo Bank Premium
123 1 1 50
123 1 2 50
In the table these are two independent records one of them have 30 in the premium and the other one has 20, so the sum is 25.
In sql I do this query:
Select sum(premium) as premium from xxx group by policynumber, riesgo.
But I don't know how to do that in Crystal Reports.
Thanks.
RE: Sum and Group by
Select the premium, and insert a subtotal.
Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)