Hi @all,
(Crystal Reports 8.0)
My report (based on a query) has 5 groups, in each group the sum of 102 fields is calculated (17 rows, 6 columns). I need to calculate the ratio in 4 rows (i.w. 6x4 calculations) in each group. At the moment I get the result by using a formula like
(for the inner group(5)):
If Sum ({Query.myField1}, {Query.Group5})<>0 Then Sum ({Query.myField3}, {Query.Group5})/Sum ({Query.myField1}, {Query.Group5})*100
(for group1):
If Sum ({Query.myField1}, {Query.Group1})<>0 Then Sum ({Query.myField3}, {Query.Group1})/Sum ({Query.myField1}, {Query.Group1})*100
Is there a way to get the current groupname so that my formula can be used in a "universal" formula like
If Sum ({Query.myField1}, {@CurrentGroupname})<>0 Then Sum ({Query.myField3}, {@CurrentGroupname})/Sum ({Query.myField1}, {@CurrentGroupname})*100
It would be a great help if someone has a solution because I'd like to avoid creating 120 separate formulas...
Thanks a lot in advance!
Matthias (from Germany)
(Crystal Reports 8.0)
My report (based on a query) has 5 groups, in each group the sum of 102 fields is calculated (17 rows, 6 columns). I need to calculate the ratio in 4 rows (i.w. 6x4 calculations) in each group. At the moment I get the result by using a formula like
(for the inner group(5)):
If Sum ({Query.myField1}, {Query.Group5})<>0 Then Sum ({Query.myField3}, {Query.Group5})/Sum ({Query.myField1}, {Query.Group5})*100
(for group1):
If Sum ({Query.myField1}, {Query.Group1})<>0 Then Sum ({Query.myField3}, {Query.Group1})/Sum ({Query.myField1}, {Query.Group1})*100
Is there a way to get the current groupname so that my formula can be used in a "universal" formula like
If Sum ({Query.myField1}, {@CurrentGroupname})<>0 Then Sum ({Query.myField3}, {@CurrentGroupname})/Sum ({Query.myField1}, {@CurrentGroupname})*100
It would be a great help if someone has a solution because I'd like to avoid creating 120 separate formulas...
Thanks a lot in advance!
Matthias (from Germany)