Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

Using IF and Maximum in selection expert

$
0
0

I'm trying to select records based off of maximum value in a field but having trouble figuring out the language needed to tell crystal how to do so.  I can suppress records like this once they are in, but dont know what to use for selection expert to exclude them instead.  And that is really what I need to do.

 

Here is what I have so far.

 

IF {TableA.FieldY} = Maximum ({TableA.FieldY}) then ???Select the record?? else ???Don't pull the record into the report??

 

 

I can hide them via suppression once they are in, but because of how I need to group the report, this is not effective.  To suppress I created a formula:

 

 

Formula "ZZZ" - IF {TableA.FieldY} = Maximum ({TableA.FieldY}) then {{TableA.FieldY} else "NotCurrent"

 

Supression - if {@ZZZ} = "NotCurrent" then true else false

 

Thanks for any advice!


Viewing all articles
Browse latest Browse all 3523

Trending Articles