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

Replace a WHERE value with a parameter

$
0
0

Hi

I have a WHERE value that is like below

  AND Practice.ibvStaffCategorisation.StaffId IN (N'DB', N'DS', N'SGW', N'GP', N'JN', N'LKB', N'MB', N'MS', N'SH', N'SR', N'EF', N'SJS', N'LJG', N'RW', N'OS')

If a member of staff leaves or joins the company I have to alter multiple dataset's, I was hoping to set this in a parameter in the report and then call it from the various dataset's.  This way I would only need to change it in one place, I already do this for Year and Period but they are single figures and an = so like below

  AND Practice.ibvStaffTime.[Year] = @Year

I then set the parameter to be  an integer, hidden and default value 2012 for instance.

I was tried the following

  AND Practice.ibvStaffCategorisation.StaffId IN @ABSStaff

Then for the parameter text, allow multiple values, hidden and then default values DB, DS, SGW, GP, JN, LKB, MB, MS, SH, SR, EF, SJS, LJG, RW, OS

This doesn't seem to work though, do I need to put the staff members as N'DB', N'DS', N'SGW', N'GP', N'JN', N'LKB', N'MB', N'MS', N'SH', N'SR', N'EF', N'SJS', N'LJG', N'RW', N'OS' or am I completely on the wrong tracks?

Any help greatly appreciated.

Cheers

Chris


Cheers Chris


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>