cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Summary placed on report footer

workinprogress
Discoverer
0 Kudos
268

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


Accepted Solutions (1)

Accepted Solutions (1)

ido_millet
Active Contributor

Consider simply inserting a CrossTab into the report footer.

Answers (0)