drosenkranz
Programmer
I'm writing a report using the group section to display totals. The detail section is closed and has no info in it by design. I'm using memory variables to count quantities for each of 20 possible reason codes that could occur during each group. I print these 20 reason codes and their counts out in the group section .
I used IIF's to get the individual counts for the 20 codes- and these work fine. I added some of the twenty codes into 4 sub-total values and each of these sub-tots are okay. I then added all 20 into a grand-total value and that was ok. Then comes the trouble.
Now I need to produce percentages for each of the four subtots with respect to the grand tot. There is not enough space to cut and paste all of the fields to represent the (subtot / grandtot * 100) formula in the box.
I tried using IIF's for the subtots but the counts would miss the very last record and they'd be one off the correct count. I think the subtots should be evaluated as expressions to memory variables but I can't figure out how to get them to do it.
How do I store these "group" totals to memory variables so I can do the math for the percentages?
I used IIF's to get the individual counts for the 20 codes- and these work fine. I added some of the twenty codes into 4 sub-total values and each of these sub-tots are okay. I then added all 20 into a grand-total value and that was ok. Then comes the trouble.
Now I need to produce percentages for each of the four subtots with respect to the grand tot. There is not enough space to cut and paste all of the fields to represent the (subtot / grandtot * 100) formula in the box.
I tried using IIF's for the subtots but the counts would miss the very last record and they'd be one off the correct count. I think the subtots should be evaluated as expressions to memory variables but I can't figure out how to get them to do it.
How do I store these "group" totals to memory variables so I can do the math for the percentages?