Reputation: 31
I have SSRS report containing two separated parameter. One passing Category and second one value. And I have one field in the report for category. How to join these two separated parameter and field of the report
Parameter example
Category--ABC,DEF
Value --1,2
SSRS Report has fields Category ABC, DEF, and later I need to do calculation
if category = ABC then value*xxx
1*XXX
How to use two separated parameter values in one and then use in report?
Upvotes: 1
Views: 54
Reputation: 21758
It's difficult to answer as your question is not very clear but I will assume the following....
myCategory
column and a myValue
columnpCategory
which is multi-valuepValue
which is a single value parameter.Your dataset query would them be something like
SELECT
myCategory
, myValue * @pValue as myNewValue
, myOtherColumns
FROM myTable
WHERE myCategory IN (@pCategory)
If you choose both "ABC" and "DEF" from the first parameter and "2" from your second parameter then the query that SSRS will send to the server will be
SELECT
myCategory
, myValue * 2 as myNewValue
, myOtherColumns
FROM myTable
WHERE myCategory IN ('ABC', 'DEF')
Upvotes: 1