Groups | Blog | Home
all groups > sql server reporting services > january 2005 >

sql server reporting services : URL Parameter and Default Values



Michael McCallum
1/4/2005 10:52:02 PM
I need to ability to pass a parameter (a session variable) on the URL that
will drive the content of parameters used for lookups. An example is that a
person may be limited to only two districts out of 10, so for that person I
only want the two districts show in the drop down list in the parameters
section. Also, ideally I would not like the person number to be shown (or
if shown read-only). I have tried several attempts using Report Manager and
what I believe was fixed in SP1 (Readme Item 4.3.1 Hiding Parameters in
Published Reports).

Example:
Reports Manager Parameter has following settings:
Has Default (Checked)
Default value (0)
Prompt User (Unchecked)
Prompt String (Not Set)

http://servername/ReportServer?%2fFolder%2fItemList&pers_number=101

I get the following error response:
"The report parameter 'pers_number' is read-only and cannot be modified"

The report I am testing this with is displaying what would be shown in a
parameter combo list, using the pers_number as its parameter. This will
allow the simplest case to test this functionality with. If I check the
Prompt User option, then the report runs displaying the correct content in
my test report.

In my real report with the above settings and the Prompt User option
checked, the default value setting (0) is being passed as the parameter to
the lookup stored procedure that fills another parameter and not the
pers_number being passed on the URL line.

Any help would be greatly appreciated!

Mike


Daniel Reib [MSFT]
1/5/2005 9:56:34 AM
Make sure that the prompt user check box is checked but that the prompt
itself is empty. This should make your parameters hidden. Note that this
can only be done through Report Manager and not through the designer.

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


[quoted text, click to view]

Daniel Reib [MSFT]
1/5/2005 12:26:02 PM
When do you receive this error?

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


[quoted text, click to view]

Michael McCallum
1/5/2005 2:15:52 PM
I have done that part, but then get this error: "This report requires a
default or user-defined value for the report parameter 'p_pers_number'. To
run or subscribe to this report, you must provide a parameter value.
(rsReportParameterValueNotSet)"

This parameter is used to limit another parameter lookup field. I am
thinking that this is where the error is being generated from. Any other
thoughts?
Mike


[quoted text, click to view]

Michael McCallum
1/5/2005 4:14:14 PM
I put the following after the report name in the URL:
&p_pers_number=101&p_paco_code=7125

Which would set the two session variable entries, that are used to filter
the other parameters. As soon as I hit enter, the toolbar returns with the
two parameters that I want to pick of the list disabled and shows the green
circle like it is executing the report. At this point is where the message
is returned.

The functionality I was looking to have is that the two remaining parameters
in the Toolbar would contain the data from their stored procedure call,
having the two URL parameters being passed to the stored procedure. I would
then expect to see a filtered list of parameters based on the priv level of
the user.

Thanks...


[quoted text, click to view]

Daniel Reib [MSFT]
1/6/2005 10:45:03 AM
Well it certainly looks like you are doing everything correct. I am not sure
at this point what the issue may be. You may want to think about contacting
PSS at this point.

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


[quoted text, click to view]

AddThis Social Bookmark Button