Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Provide user option to select a combination of values (1-a,2-b) but only pass the first values in the string (1-a) which is 1 and not to main datatset

$
0
0

I have a ssrs report which is pulling data based on user first name and last name .

Lookup Id'S using first name and last name 

using WHERE        (FirstName LIKE @ParameterFirstName) OR
                         (LastName LIKE @ParameterFLastName)

gives me list of values with id's which can be of only two types(pattern) -1. xyz123456 2.xyz789543-1234567890

Say I enter @ParameterFLastName like "James"

xyz123456-Ted James

xyz789543-Rod James

xyz789543-1234567890-Neil James

I thus show a data to user appending id with '-' full name


Now this becomes my dropdown( say @parameteruser) for user to select 

xyz123456-Ted James

xyz789543-Rod James

xyz789543-1234567890-Neil James

Now when user selects one among the above list .
I want to pass only the selected id 
to the maindataset to pull the report with other attributes.

so my main dataset query is like 

where user in @parameteruser

But I want to pass only ids here which is -"xyz123456" and not xyz123456-Ted James

I m thinking of using left function but little scared as ID might grow large to parse out the anything before -

Any thoughts appreciated




Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>