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

Mutiple Values in a Parameter

Status
Not open for further replies.

RachelK

Programmer
Mar 18, 2002
171
GB
Hi,

I have a field in my report called centre a manager could have many centre. I have created a parameter with a value and description I would like the value to have two or 3 centres in and say in select the expert that centre field = parameter centre they select the manager and it shows bot centres.

I have tried ["BB","CC"] In the value field this does not work. I do not want the users to select mutiple centres as they will only really know managers not centres. Any idea's cheers Rachel.
 
You need to edit the parameter field firat and make sure the parameter is marked as a multi-value parameter. Then don't use the select expert. (it is possible to use the select expert for this, but just clumsy).

instead click on report, edit selection formula, record and enter the following formula:

{MyFieldName} in {?MyMultiValueParameter}




Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
If you are saying that you want users to see the centres associated with a particular manager when they make their parameter selections, you could create a separate report with {table.manager} as one column and {table.centre} as another, export this as a text file, and then import this as your parameter selection list. If you need help with that, let us know (there are a few other steps). This means though that the user would need to select the manager multiple times (up to the number of centres). You might be able to group on manager in the picklist report and use the 3-formula list to accumulate centres in one line and then export it to text, although I have never tried that approach.

Otherwise, if they just choose the manager, the appropriate centres will be selected for the report, and you could group by manager and then centre to highlight those associated with each manager.

-LB
 
Within each default value you cannot have multiple values.

What you're asking for is common, but you confuse people by lengthy text descriptions of how you think it should be done rather than stating the environment (crystal and database version, example data, etc.) and requirements (how is it supposed to look).

Create the default values for the Manager parm using the names your users are comfortable with, and then in Crystal you could use the record selection formula (report->Edit Selection Formula->Record):

(
if {?ManagerParm} = "Manager1" then
{table.Centre} in ["Centre 1", "Centre 2", "Centre 3"]
else if {?ManagerParm} = "Manager2" then
{table.Centre} in ["Centre 4", "Centre 5", "Centre 6"]
)

I would really suggest that you handle this on the database side, there should be a table relationship between the manager and centres somewhere in the database design to prevent this sort of kludgy hardcoding.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top