on 2023 Oct 03 1:35 PM
Hi All,
I am using Crystal Report 2011. I need a Summary of a numeric formula field that we will call FieldToSummarize. I have created a group for a field, that we will call FieldToGroupBy, the field the records will be sorted and grouped by. I tried to insert a Summary, where, as Summary Location, I indicated FieldToGroupBy. The sums are correct if displayed in the group footer. Nevertheless, I do not want the summary in the group section as I do not want the "Group" section. I must insert the grouping in the report footer. I would like to achieve as a result a table with the distinct FieldToGroupBy and the summaries of FieldToSummarize in the report footer. The issue is that I have only the last group and the total overall if I insert the summary in the report footer. I tried another approach and Inserted a Formula Field, and placed it in the Group Footer.
The formula is the following:
WhilePrintingRecords;
Shared NumberVar Array GroupSummaries;
Local NumberVar Index;
Index := UBound(GroupSummaries) + 1;
Redim Preserve GroupSummaries[Index];
GroupSummaries[Index] := Sum({YourDataSet.FieldToSummarize}, {YourDataSet.FieldToGroupBy});
// Output an empty string so that the formula field doesn't display anything
""
I have then created another formula and placed it in the report footer. The formula is the following:
whileprintingrecords;
NumberVar GroupSummaries;
The total for FieldToSummarize is 0.00. I would like to have the sum of FieldToSummarize for every FieldToGroupBy records, as shown in below picture
Request clarification before answering.
Consider simply inserting a CrossTab into the report footer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
22 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.