on 06-23-2015 10:01 PM
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 ?? ??
Hi,
Make sure you do not have another 'reset' formula placed on the group header.
If you create another formula with this code on the Group Footer 3, does it show any values:
WhilePrintingRecords;
Numbervar RFSum;
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
Thank you for the response.
I reconfirmed that I do not have the reset formula placed only once on the Report Header.
When I place a new formula at the GF3, its showing some incorrect values (not able to find a pattern )
I think the problem might be due to the three levels of grouping I use. but not sure how to fix it.
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.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.