Last post Aug 03, 2011 03:17 AM by You-Hu Fu
Jul 29, 2011 09:03 AM|jassu107|LINK
I have one report which takes one STUDENTID (string) as input.
I have one dataset which gets filled with values of TABLE ( all records of Table gets included).
Now I want to filter the values of DATASET by comparing DATASET column with INPUT Parameter.
For Eg :
I have one Table STUDENT which fills the DATASET1.
STUDENT has three colunmns
Let say I am passing Input Parameter @StudentId ='11,12,13' ( This input parameter is concatenation of StudentIds 11,12,13)
I need to check if these IDs in @StudentId are present in Table STUDENT and show data in DATASET1 which have these values and not any other..
HOW to do this. I am not using STORED PROC....That is one handicap.
I need to do all this in SSRS itself.
Please help...Its urgent...!!!!
Jul 29, 2011 09:07 AM|hassanmehmood|LINK
Use IN operator. like:
DataRow drSelectedRows = DataSet.Tables.Select("[StudentId] IN ('11','12','13')");
Hope this helps..
Aug 03, 2011 03:17 AM|You-Hu Fu|LINK
I think you can make use of T-SQL to return '11,12,13' like this '11','12','13', then you can create a dataset using T-SQL like this
SELECT * FROM dbo.table where StudentId in ('11','12','13'), then you will know whether DATASET1 which have these values and not any other
If I misunderstand you, please feel free to let me know.