January 8, 2009 at 1:20 pm
I have a report with 7 cascading multi-value parameters.
Each dataset is using its own stored procedure.
I need parameter 2 to permit no more than 5 values to be selected.
I found one way to do it: in the stored procedure for parameter 3 I count values coming from parameter 2 and, if >5 I return error message as text to show in parameter 3.
However, I think there is a better (and proper) way to accomplish same thing, without even looking into parameter 3.
Could someone "in the know" hint how to make SSRS check number of selected values in parameter 2 and pop up an error message even before reading dataset for parameter 3?
Thank you!
January 8, 2009 at 3:05 pm
@@ROWCOUNT?
I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
January 8, 2009 at 3:24 pm
I probably poorly described my question. The parameters are in Reporting Services. Each parameter is using its own dataset (also in SSRS). Each dataset is created by a stored procedure (now in SQL database). So in my current version stored procedure for parameter 3 is using several values, coming from Report, counts them and, if more than 5 has been selected in parameter 2, procedure for parameter 3 returns string "More than 5 parameters!!" to be shown in the text box for parameter 3. User is expected to understand what is going on and change selection for parameter 2. If s/he selects that message as a value for parameter 3 (which is technically possible), further selections will not work as nothing will be selected for parameter 4 etc. I am trying to get an alert pop up immediately in Report as soon as user clicks away from parameter 2 where more than 5 values selected. Do not see anything in SSRS to check number of values, selected in a multi-value parameter...
how does @@ROWCOUNT related to my question I do not understand... probably it does not.
thanks anyway
January 8, 2009 at 3:36 pm
Ah - repotying errvices or BI would have been better forums.
When you transfer the data into a recordset object - do a rowcount on that and if it exceeds your threshold, treat it accordingly - eg, use a script to raise an error
I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply