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

Parameter Selection Problem 1

Status
Not open for further replies.

lewes

Technical User
Apr 7, 2008
14
GB
Hi, help would be much appreciated.
I have a parameter {?Person} which runs at the beginning of a report and asks the user to either enter the initials of a person or leave it blank to select all the persons.

The report decides whether to display one person or all using the following process:-

Formula {@Person Selection} is:-
if {?Person} = "" then "*" else {?Person}

In the selection criteria I have typed:-
{@Person} like {@Person Selection}

{@Person} is the field in the report which is used in the selection.

This means the report either displays information for a specific person or uses * when the parameter is blank to show information on every person.

This works fine but what I now want to be able to do is for the user to enter multiple perons instead of just one or all. I have tried changing {?Person} to allow multiple entries. This then creates an error:- This array must be subscripted. For example: Array [j]. in the {@Person Selection} formula.

Does any one know how I can fix this error? I'm not sure how to set up an array in the {@Person Selection} formula. Perhaps someone knows how to do the whole thing a different way.

Thanks for any help
 
First of all, you need a value for your parameter. I usually set a default value of ALL.

In your record selection, enter the following

(
if {?person} = "ALL" then
true
else
{table.person} = {?person}
)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top