Hi,
I use CRXI and Sql Server 2000. I want a report, that users can choose multiple student IDs they want to see, then the report passes these mutliple IDs to a stored procedure as parameters, the sp runs and returns records which are only related to the students the user has chosen.
The difficutly, as I understand, is that a user might choose 1, 2, or any number of student IDs, and a stored procedure cannot take an array as its parameter. Obviosuly, I cannot write endless stored procedure like myProc(studentID1), myProc(studentID1, studentID2)....
I know one solution to that, is to let the sp return all records and let crystal report do the filtering thru "selection expert", however, this is not an ideal solution. We would rather let the database do the filtering, since the data is huge and the sp is very complicated, e.g. it may take 10+ minutes to return all the records, while frequently, a user may only want to see 5-6 records of them.
Can anyone here give me some ideas of how to implemnt it?
I desperately need to get it done. Many Thanks!!
I use CRXI and Sql Server 2000. I want a report, that users can choose multiple student IDs they want to see, then the report passes these mutliple IDs to a stored procedure as parameters, the sp runs and returns records which are only related to the students the user has chosen.
The difficutly, as I understand, is that a user might choose 1, 2, or any number of student IDs, and a stored procedure cannot take an array as its parameter. Obviosuly, I cannot write endless stored procedure like myProc(studentID1), myProc(studentID1, studentID2)....
I know one solution to that, is to let the sp return all records and let crystal report do the filtering thru "selection expert", however, this is not an ideal solution. We would rather let the database do the filtering, since the data is huge and the sp is very complicated, e.g. it may take 10+ minutes to return all the records, while frequently, a user may only want to see 5-6 records of them.
Can anyone here give me some ideas of how to implemnt it?
I desperately need to get it done. Many Thanks!!