Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In SQL Reporting Services, how to filter a dataset according to a parameter?

I've got an unfiltered dataset to deal with so as to generate a report (SQL Server 2005 btw).

Let's say I've got a Name column, and I'd want to add a parameter to my report, so as to select only the names containing some characters.

Does one know how to deal with these filters?

I've tried with no luck these:

=Fields!Name.Value Like =Parameters!FilterName.Value

=Fields!Name.Value = = "%" + Parameters!FilterName.Value + "%"

I'd like to be able to get the names 'foo' and 'foobar', if I give the parameter 'oo'

Edit: I know the filtering should be done on the SQL server side, but I don't control the dataset I'm given (a webservice gives it with a no-parameters method), so I have to filter on the report side.

like image 513
Vinzz Avatar asked May 15 '09 15:05

Vinzz


People also ask

Which parameters are used for filtering the data at the time of report processing?

Query parameters are used during data processing to select or filter data. Query parameters are specified in the syntax of a data processing extension.

Which parameters can be used as filter in OOB reports?

Note: Here we have used the “CRM_FilterText” OOB parameter to get the filter criteria in report.


1 Answers

I answer to my own question, the filter expression is in fact:

=Fields!Name.Value Like ="*"+ Parameters!FilterName.Value + "*"

i.e. use "*" instead of "%", in fact.

like image 121
Vinzz Avatar answered Nov 10 '22 04:11

Vinzz