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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Parameters in selection expert

Status
Not open for further replies.

omega1983

Programmer
Dec 21, 2004
32
US
I am using CR8.0. Parameter1 is a multiple selection parameter. If the constituent = C or A and the lookup = 1 then show records. Paramter 2 is also a multiple seection paramter. If constituent = I or P and lookup = 2 then show records. In the selection expert, I want to be able use the lookup and have it select records based on either paramter1 or 2. The idea is to do some type of array or if then using the 2 paramters in the selection expert to limit records based on which paramter is selected. I tried it and initially limited some records. However when I used paramter 2, paramter 1 records still showed up. Essentially there should have been some type of reset. Any ideas on what to do here
 
I'm not sure I follow. Could you post your selection logic? On Crystal 8.5, it would be [Edit Selection Formula] & [Record] under [Report].


[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
have default values for the parameters like zero:

if (parameter2 <> 0
and (constitunent = "P" or constituent = "I")
and lookup = 2) then true else
if (parameter1 <> 0
and (constitunent = "C" or constituent = "A")
and lookup = 1) then true else
false

 
I'd put them as two formula fields, say
@Test1
parameter2 <> 0
and (constitunent = "P" or constituent = "I")
and lookup = 2

@Test2
parameter1 <> 0
and (constitunent = "C" or constituent = "A")
and lookup = 1

In your record selection, say
@Test1 or @Test2

The formula you have might possibly work if you added another else false at the end. But doing it by 'boolians' is a safer method.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top