Hello,
I am using Crystal XI rel2 with an informix 10 database.
I have a main report with a subreport to pull sales data into an inventory listing report.
I have all of the shared variables working and giving me correct totals for each group and for grand totals.
The variables are passing sales quantites from the sub report to the main report. There are 2 groups defined in both the main and sub reports, class and style.
The report requires grand totals as well.
For the GF2(class) I have a variable for total sold by class. This calculates and resets correctly using accumulation, reset and display variable formulas.
I also have the variable for grand totals calculating and resetting correctly.
The GF2 formula
//@classtotalsolddisplay
whileprintingrecords;
shared numbervar sumclassqty;
sumclassqty
The RF formula
//@grandtotalsolddisplay
whileprintingrecords;
shared numbervar sumgrandqty;
sumgrandqty
Here is the problem.
I need to calculate a percentage formula called class mix.
This formula should be
//@classmix%
if sumgrandqty <>0
then sumclassqty/sumgrandqty *100.
I am getting 100% for the first class value and incorrect percentages for the remaining class totals.
Is there a way to get this percentage formula to calculate the correct mix%?
Any help is appreciated.
Thanks,
Stacey
I am using Crystal XI rel2 with an informix 10 database.
I have a main report with a subreport to pull sales data into an inventory listing report.
I have all of the shared variables working and giving me correct totals for each group and for grand totals.
The variables are passing sales quantites from the sub report to the main report. There are 2 groups defined in both the main and sub reports, class and style.
The report requires grand totals as well.
For the GF2(class) I have a variable for total sold by class. This calculates and resets correctly using accumulation, reset and display variable formulas.
I also have the variable for grand totals calculating and resetting correctly.
The GF2 formula
//@classtotalsolddisplay
whileprintingrecords;
shared numbervar sumclassqty;
sumclassqty
The RF formula
//@grandtotalsolddisplay
whileprintingrecords;
shared numbervar sumgrandqty;
sumgrandqty
Here is the problem.
I need to calculate a percentage formula called class mix.
This formula should be
//@classmix%
if sumgrandqty <>0
then sumclassqty/sumgrandqty *100.
I am getting 100% for the first class value and incorrect percentages for the remaining class totals.
Is there a way to get this percentage formula to calculate the correct mix%?
Any help is appreciated.
Thanks,
Stacey