cancel
Showing results for 
Search instead for 
Did you mean: 

Summing a column of Max fields

former_member584790
Participant
0 Kudos

I have a report that has columns of fields that are themselves inserts but a Max for that field. Now they want this summarized. I am not getting the right results. SHould I be using whilePrintingRecords formula or some other feature? How do you use WhilePrintingRecords like that?

The problem is that this type of field this Max, cannot be summarized. I tried to make such a formula to sum and it is not allowable.

I can't get this column to summarize. What I want to do is for each line, take the Summary Max and out it in a grand totals bucket and print this at the end.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try the following formula :

WhileprintingRecords;

Numbervar x;

x:=x+Max(fieldvalue);

x;

Place this formula in your detail / group where you have max field and place the below formula in your grand total :

WhilePrintingRecords;

Numbervar x;

x;

Thanks,

Sastry

former_member584790
Participant
0 Kudos

That's it, absolutely brilliant!

former_member584790
Participant
0 Kudos

What about if I have 2 fields across that have to be added together to get a line total?

I can't add the 2 formulas at the end. Iow, I have this formula

WhileprintingRecords;

Numbervar q1;

q1:=q1+ (sum ({@Quoted 1}, {Command.CUSTNAME}));

q1;

I have 4 of these, q1-q4 and also 4 b1-b4 for the whole line.

These work but I need to add them all up for an across line total.

Answers (1)

Answers (1)

former_member584790
Participant
0 Kudos

need to sum fields across the line in one case and max in the other case..