sql server - How to filter a column using multi value parameter list in SSRS -


i new ssrs. thought should simple took me 1 day , not able fix it. need following

select * table1 len(username) <= 6 select * table1 len(username) >= 7 

i want display drop menu 2 options short username , long username. when username click short username first query result showed , when user click long username second query result showed.

what did far added parameter list 2 values i.e short parameter list = 6 , long parameter list = 7. added 2 filters. in first expression= len(namecolumn.value) operator= <= value = @parameter. in second expression= len(namecolumn.value) operator= >= value = @parameter. can please can achieve it.

you can similar filter in dataset @energ1ser mentioned.

you have parameter user selects either long or short. might use different values it.

for expression, use:

=iif( (parameters!yourparameter.value = "short" , len(fields!username.value) <= 6)     or (parameters!yourparameter.value = "long"  , len(fields!username.value) >= 7), 1, 0) 

for type, use integer, , operator = , value 1.

this expression calculates each row 0 or 1 , filters 1's.

to display all records, add or when selected parameter.

=iif( (parameters!yourparameter.value = "short" , len(fields!username.value) <= 6)     or (parameters!yourparameter.value = "long"  , len(fields!username.value) >= 7)     or (parameters!yourparameter.value = "all"), 1, 0) 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -