all groups > sql server reporting services > may 2006 >
You're in the

sql server reporting services

group:

Can parameters be optional?



Can parameters be optional? Ben
5/3/2006 11:38:01 AM
sql server reporting services: I have a report where when a user selects parameter1, parameter2 becomes
available because parameter2 is based on parameter1. My problem is, if the
user wishes to only run the report using parameter1, they will not select any
value from parameter2. Even though I have set parameter2 to be a sting that
allows nulls and blanks, when the user clicks on view report, nothing happens
untill a value for parameter2 is chosen. The source for parameter2 is a
stored procedure (query).

I would like the user to be able to only select the variables desired (even
though each is based off the previous selection). When the user clicks the
preview button, the source for the report should be able to determine the
exact query string (same columns always returned, just filtered depending on
parameters).

Any suggestions?
Thanks in advance.
Re: Can parameters be optional? Ben
5/4/2006 11:39:02 AM
Thank you for your reply.

I have tried that and Parameter2, even with a default value of NULL still
prevents the report from being viewed.

Any other suggestions?

I heard that if i UNION the query list with a record that uses a null value
that it might default to selecting that one.. any thoughts?

Thanks.

[quoted text, click to view]
Re: Can parameters be optional? Kaisa M. Lindahl Lervik
5/4/2006 2:52:42 PM
Try creating a default value for Parameter2. That way, Parameter2 should be
valid.

Kaisa M. LIndahl Lervik
[quoted text, click to view]

Re: Can parameters be optional? Kaisa M. Lindahl Lervik
5/9/2006 11:16:37 AM
I haven't tried the UNION approach, but it sounds good to me.
Can you try it out, and just add it to a test section of Report Manager?

Kaisa M. Lindahl Lervik
[quoted text, click to view]

AddThis Social Bookmark Button