Your filter expression is
=Parameters!Tasks.Value(0) which is only the first selected parameter value.
There are a few ways to fix this issue.
You should be able to change your expression to =JOIN(Parameters!Tasks.Value, ",")
although this might not work depending on datatypes etc. All this does is pass a comma separated list to the filter.
However I would question if this is the best approach. If you can, I would filter in the dataset query as this means only the required data is returned and it makes you count much simpler.
If you need the individual records but also need the count then return all required rows with a dataset query that looks something like.
SELECT * FROM WSVLWOs WHERE WO_ACTN_TY IN(@Tasks)
@Tasks
will be passed into the query, parsed correctly and you will only get the records you need. Your COUNT()
expression with then work fine.
If you only needed the count then then you could just do this in your dataset query and return just the count
SELECT COUNT(*) as myCount FROM WSVLWOs WHERE WO_ACTN_TY IN(@Tasks)
Then you could just reference the myCount
fields from the dataset to get your answer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…