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

Need help writing the correct Record Selection Formula

Status
Not open for further replies.
Joined
Oct 23, 2007
Messages
24
Location
US
Goal: retrieve all Authorizations that cover Service Codes checked from the parameter screen.

Each authorization can cover one or multiple services and the authorization table looks like:
----------------------------------------------------
authorization.number | authorization.servicecode
----------------------------------------------------
A100 | 100&200&400
A101 | 500
A102 | 300&400&800
A103 | 200&500
A104 | 300&800


I have a multivalue parameter in the form of a checklist:
-----------------------------
SERVICE CODE
o 100
o 200
o 300
o 400
o 500
o 600
o 700
o 800
o 900
o etc
-----------------------------

A concatenated string will be created based on each checked value, separated with a "&" sign, shown in this format:
"100&300&400&700"

Expected results:
If I run my report with the above selection, I expect to see these authorizations:
A100 (code 100 and 400 are among the checked values)
A102 (code 300 and 400 are among the checked values)
A104 (code 300 is among the checked values)

A101 and A103 should be excluded from the report since neither code 200 nor code 500 were selected from the parameter screen.


Challenge: I keep on getting errors while writing my Record Selection Formula. I tried writing:
formula 1:
{authorization.servicecode} = split({selected_servicecode},"&") - not working
formula 2:
split({?selected_servicecode},"&") IN {authorization.servicecode} - not working

Please help! Thanks a lot!
 
You need to do the split on the field, and then you can compare the array to the parameter. You should be able to use
{?AuthCode} = Split({authorization.servicecode},"&")


Editor and Publisher of Crystal Clear
 
How are you concatenating the parameter values? If you didn't do that, and instead just left them as multiple values, you could follow the steps in thread767-1464063.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top