SSRS + Pass integer stored as varchar

I am building a report using SSSR and have a parameter in my query that accept integers.

for example the where statment is currently where customervalue in (@CValue)

in the parameters on the report I have a list 0 thru 10 where user can select as many numbers as they want to pull the list back.

I want to have just 3 categories though

Low = 0,1,2,3
Medium = 4,5,6,7,
High = 8,9,10

But if I put in the available values for paremeters - Low and then in value 0,1,2,3 i get the error "Conversion failed when converting the nvarchar value '0,1,2,3' to data type in.

Is there anyway I can do this or do I have to have 0 - 10 as the options ?

Thansk
dkilbyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edtechdbaCommented:
What if your stored procedure or sql looks something like this below, I've done something similar for selecting last name ranges for an SSRS report. This way you can pass a varchar range (from the report parameter) into a stored procedure and return the proper rows that contain the appropriate integer values.

storedprocedurename (@cvalue varchar(10))

-- Select low integer range
if @cvalue = '0,1,2,3'
    begin
        select col1, col2, col3, col4
        from table
        where col1 in (0,1,2,3) -- Assuming col1 is the integer field you are looking to filter
    end

-- Select medium integer range
if @cvalue = '4,5,6,7'
    begin
        select col1, col2, col3, col4
        from table
        where col1 in (4,5,6,7) -- Assuming col1 is the integer field you are looking to filter
    end

-- Select high integer range
if @cvalue = '8,9,10'
    begin
        select col1, col2, col3, col4
        from table
        where col1 in (8,9,10) -- Assuming col1 is the integer field you are looking to filter
    end
0
dkilbyAuthor Commented:
The problem is the user could select Low and High at the same time, or Low, Medium and High or any combination of the 3, not just one option at a time.
0
edtechdbaCommented:
What are you passing in from the drop down parameter?

"High"
"Medium"
"Low"

or

"0,1,2,3"
"4,5,6,7"
"8,9,10"
0
dkilbyAuthor Commented:
The user sees

"High"
"Medium"
"Low"

and values passed to parameter are:

"0,1,2,3"
"4,5,6,7"
"8,9,10"
0
Vikas GargBusiness Intelligence DeveloperCommented:
Hello,

You can have label different in parameter and value different.
Values will be used as parameter values while the labels will be consider as user friendly values.

Parameter Properties
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSRS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.