Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Formula as Parameter

Status
Not open for further replies.

eebabe

IS-IT--Management
Jul 17, 2003
54
0
0
US
Using CR 9.
My Data:

PCR# MEDS
10-01-2446 MID
10-01-2446 MOR

My Formula: Minimum(Meds, PCR#)&" & " &Maximum(MEDS, PCR#) to get "MID & MOR". I want to filter the report that only shows "MID & MOR". How can I bind the formula to the selection criteria?

Thanks.
 

So are you wanting groups that always have two records, and that one record is MID and the other MOR? That is the only way that this would be guaranteed to work.

If so, your group selection formula would be:

{@yourformula} = "MID & MOR"

But what are the other possible values for the Meds field? For instance, if records could have a value of EVE, that would be the new minimum value - your formula could evaluate to "EVE & MOR", and would be excluded from the selection, even though that group may have had both MID and MOR records.

If you just want groups that have at least one MID and one MOR record, but could have many records, then a slightly different approach would work better.



 
Further to Brian's comment above, you may be able to have a check formula for each instance, for example:

{@MOR_Check}:
IF {Table.MEDS} = "MOR" THEN 1 ELSE 0

{@MID_Check}:
IF {Table.MEDS} = "MID" THEN 1 ELSE 0

Then your (group) selection could be based on:
Sum({@MOR_Check}, PCR#}>0 AND Sum({@MID_Check}, PCR#}>0

Or something similar.

Mike
---------------------------------------------------------------
EvE Online: Claim the Destiny that is Rightfully Yours...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top