Hello,

I am working on Crystal reports and I cannot find a way to use the classic functions -**sum() **or **max()-** on formula fields I created (it only works with data field ), I get the following error message:

'This field cannot be summarized'

*My formula field is the following:*

WhilePrintingRecords;
NumberVar compte;
compte=0;
if {JOB_MAIN.datetime_open} in {@dateStartsup} to {@dateEndsup} then
compte:= compte + 1;

*Basically it just counts the number of rows in a certain date range.*

*Then, I need to pass the total number to the main report, so I need to apply ***maximum() **function to my formula field:

WhilePrintingRecords;
Shared NumberVar maxvalue:=maximum({@compte});
maxvalue;

*And then I get the error message **'this field cannot be summarized'. I cannot apply ***maximum() **to **{@compte}**.

If anyone has an idea on how to fix this issue, please let me know!

Thanks!

Mounia

## Add comment