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

Select Expert Formula for Parameter

Status
Not open for further replies.

nicmcd77

Technical User
Oct 11, 2016
17
US
Does anyone know how to make this work? I need this field to be equal to the parameter ?Site, but I also want it to be equal to -1 or -2. It's saying I need it to be an array. Basically it's to chart limits which are for site =-1 and/or site=-2 plus the actual site. The Site parameter is dynamic so I don't know if that matters.

{RPT_EM_RESULTS_TREND_LOC_V.site_id} in [ {?Site},-1,-2]

It works in the Editor if I do, but once I click "Select Expert" it gives me an error.
({RPT_EM_RESULTS_TREND_LOC_V.site_id} = {?Site} or {RPT_EM_RESULTS_TREND_LOC_V.site_id} in[ -1,-2])
 
It sounds like you have {?Site} set up as a multi-value parameter. If you set up the record selection formula as shown at the end of your post it should work without error, although I would replace the "=" with "in". I personally never use the select expert (unless I'm using the subreport expert), but instead always go to report->selection formula->record and enter the selection criteria there.

Your selection formula will still only return the values that appear in the site_id field in your database, so if -1 and -2 are not found in the database, they will not appear regardless of your selection formula. If this is the case, there is a solution where you add -1 and -2 to your dataset using a union statement within a command. Let me know if this is the case and you need help with that.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top