all groups > sql server reporting services > february 2005 >
You're in the

sql server reporting services

group:

Report Parameter Problem


Report Parameter Problem TomT
2/28/2005 6:03:03 PM
sql server reporting services: I have a report based on a stored procedure with three parameters: Start
Date, End Date, and Salesperson.

The first two are required, and the Salesperson is not. In the report, the
Salesperson is based on a query which provides a drop down for choosing a
name. It is set to allow nulls and blanks.

When I run the report in Visual Studio preview, if no Salesperson is chosen,
and both dates are entered, no data is returned. Doing the same thing via
debug in a browser, (the drop down is not blank, but says <Selelct a value>),
I get prompted to supply the Salesperson parameter.

Supplying a value for Salesperson in both cases works fine, but I want the
user to have the option to get all the data, not just for a particular
person. I've covered this case in the stored procedure, so I'm not sure what
is getting passed in the previewer when nothing is entered and no data is
returned.

If I run the query (sp) via the Data tab, and provide exactly the same
values for the parameters, I get the data I expect, and no prompt for the
Salesperson.

If I put a default value in for the Salesperson, (non-queried), e.g. "All",
the preview in VS goes crazy, and locks up.

I would have thought with allowing nulls and/or blanks, this should work. Am
I missing something?

Thanks for any help,

Re: Report Parameter Problem Lev Semenets [MSFT]
2/28/2005 10:53:35 PM
If Salesperson parameter uses available values from query, then the query
must return null or blank as one of available values.

--
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: Report Parameter Problem TomT
3/1/2005 8:41:02 PM
Lev, thanks, I was assuming if no choice was made (drop down blank) a null
would be passed. I fixed it up to provide a value simulating a null
situation, and it now works fine.

Thanks for your quick response...

Tom

[quoted text, click to view]
Re: Report Parameter Problem tiwanap
3/28/2005 1:53:03 PM
TomT
Could you please tell me how did you simulate a value of null. I am running
into exactly same problem as yours where I cant make paramter optional as
Report Manager forces me to choose a value although I have defined null and
blank as options for the parameter.

TIA


[quoted text, click to view]
Re: Report Parameter Problem tiwanap
3/28/2005 1:53:04 PM
TomT
Could you please tell me how did you simulate a value of null. I am running
into exactly same problem as yours where I cant make paramter optional as
Report Manager forces me to choose a value although I have defined null and
blank as options for the parameter.

TIA

[quoted text, click to view]
RE: Report Parameter Problem tiwanap
3/28/2005 1:53:05 PM

TomT
Could you please tell me how did you simulate a value of null. I am running
into exactly same problem as yours where I cant make paramter optional as
Report Manager forces me to choose a value although I have defined null and
blank as options for the parameter.

TIA

[quoted text, click to view]
Re: Report Parameter Problem Lev Semenets [MSFT]
4/4/2005 9:26:24 PM
Did you set default value for the parameter?

--
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

AddThis Social Bookmark Button