Hi All,
Here is the scenario:
I have two dropdown parameters; one is State (CA or CO, user can select only one), and Company (total 3 companies - CompA, CompB, CompC - multivalue)
The query in the dataset looks like this
SELECT * FROM myTable WHERE Company IN (...)
Under the IN clause I have to send multiple comma separated values; for instance if the user selects CA and CompA, it should be "MAAA1, MAAA2", if it is CompAand CompB then "MAAA1, MAAA2, MABB1, MABB2".
Similarly if the state is CO, for CompA, the sting in the IN clause would be "NBAA1, NBAA2 etc.
So basically I'm trying to send multiple comma separated values based on the selection.
---------
This is what I tried so far:
I created @Loc parameter with the following values
Label - Value
CompA - if state 'CA' then "MAAA1, MAAA2", Else If state 'CO' then "NBAA1, NBAA2", Else ""
CompB - if state 'CA' then "MABB1, MABB2", Else If state 'CO' then "NBBB1, NBBB2", Else ""
CompC - if state 'CA' then "MACC1, MACC2", Else If state 'CO' then "NBCC1, NBCC2", Else ""
Changed the query under dataset to
SELECT * FROM myTable WHERE Company IN (?)
This created a parameter named "Parameter1" and I put this value for the default value:
=Join(Split(Parameters!Loc.Value(0), ",",) ",")
However the query is returning blank even though I know there should be records.
----
Where am I going wrong?
Thanks.