Skip to Content
avatar image
Former Member

How can I get the maximum value of a formula field since 'it cannot be summarized'?

Hi everyone!

I am quite new to Crystal Reports. I have a question regarding formula fields:

How can I get the maximum value of a formula field since 'it cannot be summarized'?

I looked on many forums but I don't find any successful answer, hopefully someone here will help me find a solution!

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 22, 2017 at 03:59 PM

    You will need to use a variable

    assuming you may want to reset use 3 formula,

    @reset// place this in group header where max is being determined and suppress

    Whileprintingrecords;

    Global Numbervar maxval:=0

    @Eval // Place this in group footer where max is being evaluated/displayed and suppress

    Whileprintingrecords;

    Global Numbervar maxval;

    If sum(valuefield, groupfield) > maxval then maxval:= sum(valuefield, groupfield) // replace valuefield and groupfiled with your respective field names

    @display place this where you want to see the max of summarised field

    Whileprintingrecords;

    Global Numbervar maxval;

    Ian

    Add comment
    10|10000 characters needed characters exceeded

    • replace this bit of the eval formula with your formula.

      the variable will then find the max of that.

      Alternatively post your formula and an indication of report structure, showing where formula is being evaluated and which group needs to show max of that formula

      Ian