Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 28687

Dataset filter LIKE operator

$
0
0

I have a sales report where managers need to see all users but each salesperson should see only their own sales. I tried adjusting the SQL query but report performance slows from about 5 seconds to over 30 seconds.

A dataset filter is faster in this case. The dataset filter parameter works when using "=" operator. I need to use a LIKE operator so managers do not get a filtered report. But I cannot get the LIKE operator to work properly. The equal operator will filter correctly, LIKE does not filter anything.

My dataset Filter Value expression is:

=Iif(Parameters!ReportUser.Value = Fields!DomainUser.Value AND Fields!UserRestricted.Value = "Y", Parameters!ReportUser.Value, "*")

Parameters!ReportUser.Value gets set to User!UserID

Fields!DomainUser.Value AND Fields!UserRestricted.Value are in my query. The various restricted sales reps get the UserRestricted value set to 'Y'

I have also tried simply using User!UserID in the filter value expression and get the same results. Using the Parameters!ReportUser should allow me to test results with various users.

I am using SQL Server and SSRS 2008 (not R2).

Thanks


Viewing all articles
Browse latest Browse all 28687

Latest Images

Trending Articles



Latest Images