Good morning Experts!
Once again I fear I may have outsmarted myself in the interest of providing more user-friendly reports. (SSRS 2008 R2)
I populate a user-selection list from SQL like this:
SELECT sysCode || ' - ' || codeDescription AS CodeSelection
ORDER BY sysCode
...quite naturally, the selection list (for the user) is a neatly laid out set of selection that look something like this:
BR549 - Portable Light Retriever
CC212 - West Virginia Nothing Grinder
FB900 - Left-Handed Metric Adjustable Wrench
VS829 - Radial Spectrum Weeble Balancer
...and the user has the option to select multiple list entries, if they desire. That all works just spiffily, and the users like the added descriptions to go with the codes.
But that's where everything breaks. Normally, all I need to do is add a clause:
WHERE whasit IN (:UserSelectedStuff)
in my normal SQL code and it matches the [whatsits] to the user-selected items; but not any more. I realize that the selections are an array, but need to somehow "strip off" everything past the the "-" (which I added in the SQL statement). That's the rub - if I can just get rid of the "-" and all of the information to the right of it, the list will re-match what appears in the [whatsit] column of the table.
How might I achieve this feat? Or am I being "too nice" to my users by providing additionally clarifying information with the code list they normally would have to guess at? I'd really like to make this work, because other than the fact that it doesn't, my test lab people are really a fan.
Thanks in advance,
The Lurking LongFist