Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calculate Report Grand Total by summarizing the Group total

Hi,

I am very new to crystal report and learning to create reports using Crystal Report XI.

Please share your thought on the below, thank you in advance for spending your valuable time on this.

I have a requirement like the below,

Group     Department           TotalSale         ContrGrocery       ContrFurniture

Group1   Depot1               1000                   900                    100

Group2    Depot1               2000                 1500                    500

Group2     Depot 2           3000                   2100                     900

Group3      Depot 1          5000                   3000                     2000

Group3      Depot2          3000                   2100                      900

Group4      Depot1           13000               12100                     900

I need to show the Grand total with the Summed value of the each column.

I am able to do the Total sale column easily since its a direct running total calculation of sale amount grouped by department.

The other two columns are based on multiple calculation of different group level summarized fields. So I will not be able to perform the running total or simply by a formula to summarize the detailed record data.

So, I tried to create a three formula method to create a shared variable to accumulate the running total of the group footer total.

Created the below formula and placed in report header

WhilePrintingRecords;

Numbervar RFSum :=0;

Created the below formula and placed in Group footer (GF3)

WhilePrintingRecords;

Numbervar RFSum;   

RFSum:=RFSum+{already calculated CntrGrocery column};

Created the below formula and placed in report Footer

WhilePrintingRecords;

Numbervar RFSum;

But the value is not getting accumulated correctly. When i try to display the already calculated column that i am using for accumulation, its coming correctly but when i try to accumulate the value it is not getting accumulated correctly.


Please share your thought on solving the below issue, thank you in advance for your support and time.


just to add, my report format is like the below,

GF1---> Grouping based on Department (for Sorting)

GF2---> Grouping based on Department (Do not Display in output)

GF3---> Grouping based on Department & type of employee  -  The reporting will be displaying the GF3 with summarized values.


Rh-->        Group     Department           TotalSale         ContrGrocery       ContrFurniture

GF3-->      Group1   Depot1               1000                   900                    100

GF3-->      Group2    Depot1               2000                 1500                    500

GF3-->      Group2     Depot 2           3000                   2100                     900

GF3-->      Group3      Depot 1          5000                   3000                     2000

GF3-->      Group3      Depot2          3000                   2100                      900

GF3-->      Group4      Depot1           13000               12100                     900


RF                                              27000                   ??                        ??

Tags:
replied

Hi Abhilash,

I had a suppression logic for certain depots, that I had missed to consider while summing up the totals (in summation formula).That was the reason my calculated values were incorrect. I have updated the formula to consider the suppression logic too, now I am getting the expected output.

Thank you for your time.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question