Showing results for 
Search instead for 
Did you mean: 

Help with maximum function CrystalReports!!

Former Member
0 Kudos

Hi, I know it might be a silly question but I really don't know how to figure it out. In Crystal reports let's say I have the following information:

statename          amount

AA    100

BB   2000

CC    12

DD   500

I want to display at top just the maximum value and its statename besides it

let say itshould be just

2000 BB

But i don't know how to do it, I mean I know howto display the value of 2000 using Maximum, but how to show its correspondant statename?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi use this,

right click on state name field and amount field and use conditional suppression logic.

if (table.amount)=maximum((table.amount)) then true else false

Former Member
0 Kudos

Hi Sorry,

Use this it will work.

1.Create a formula for state and place it detail section.

If {Account.Amount} = Maximum ({Account.Amount}) Then {Account.state}

2.Drag amount field into detail section and Right click on amount field->suppress->x-2->write this formula

If {Account.Amount} <>Maximum ({Account.Amount}) then true else false.

here account is your table name

Hope this helps u

Former Member
0 Kudos

Hi Erika,

if the values are in Detail section then you just right click on grey are of detail section --> Select 'Section expert' --> Click on "suppress" condition formula --> place the below formula there...

if {amount} = Maximum ({amount}) then false else true

Click ok and check the report.

Hope this information will help you...