??? Reporting services parameters of the problem

Category: MS-SQL Server -> Foundation Classes Author: james_tokyo Date: 2010-04-03 16:30:23
 
james_tokyo
2010-04-03 16:30:23
I set the report parameters to select multiple values, that is, there is the option to select all

However, I now need

query when the user selects an option the time, check out this option is on the first 1000 pen data select top 1000 * from table1 where c1 in (@ p1)

When the user selects all options When I need a query statement is slect * from table1

how do I do?

is better than using a stored procedure, how to do it?
suguannan
2010-04-03 16:46:53
- do not quite understand what you mean, if only different conditions
- divided into two statements do not write on it?
if conditions 1
; select top 1000 * from table1
else
slect * from table1
wangqiuyuehnu
2010-04-03 16:54:37
can be done directly in the program , for example in asp.net:
string s1 = "a", s2 = "b"; / / ; Note that the logic of selection parameters can be
string s = "select * from tb where Nam in ('"+ s1 +"', '"+ s2 +"') ";
/ / then connect database query
jia326356864
2010-04-03 17:11:41
complex logic to select parameters, you can write a function to return in special list of strings behind