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

sql server reporting services : Report Parameters


PeteMitchell
9/9/2005 10:38:03 AM
I have a report that takes one parameter called StartDate and I have given it
a default value and a prompt of 'Enter a Starting Date'. When I preview it in
the report writer or run it from the Report Manager after deployment, the
report runs using the default value, displays the correct data, and the
prompt is displayed with the default value in the input box. All is well and
I am a happy guy.

I have second report with a textbox that navigates to the first report using
the 'Jump to Report' method.

When jumping from the second report to the first from the DESIGNER, the
report runs using the default value, displays the correct data, and the
prompt is displayed with the default value in the input box. Again, all is
well.

When doing the same from the Report Manager I get the same results EXCEPT
the prompt is NOT displayed at all. How can I make the prompt allways show
when jumping from one report to another ?

I notice that when you hover over the textbox/link that the URL to the
target report is diplayed in the status bar of the browser with the value
rs:Parameters=False there. What needs to be done to make it "True"

Thanks in Advance
Pete
PeteMitchell
9/9/2005 12:24:31 PM
Thanks for your response.
I don't see how that will ensure that the parameters will be displayed with
their prompt on the target report.

I understand that you are manually building the URL to the target. Are you
doing that in the 'Jump to Report' drop-down of the Navigation tab in the
textbox's properties ?

Pete

[quoted text, click to view]
Bruce L-C [MVP]
9/9/2005 12:56:22 PM
You need to use Jump to URL:

The below example specifies the directory starting from the root. I have
this because this particular report can reside in a different directory than
the report I am jumping to. If it is in the same directory you can just not
worry about specifying the directory. A couple of others things to note, I
use the globals variable so this will work regardless of where I deploy it.
Also, note that parameter values are case sensitive so you must match it
exactly or you will end up without values in your parameter fields. Also
note that you can add to this URL a command to tell it to hide the parameter
toolbar. Anyway, this should get you started.
=Globals!ReportServerUrl & "?/Inventory/Similar Loads&Manifest=" &
Fields!manifstdocno.Value & "&WasteIDNum=" & Fields!wasteidnum.Value


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

PeteMitchell
9/9/2005 1:10:04 PM
I guess I should brush up on my reading skills ! Haha (You did say Jump to
URL and not Jump to Report.) :)

That works like a charm. Thanks very much. You're right about URL being more
flexible. I've copied your samples into my evil book or reporting trickery.

Pete

[quoted text, click to view]
Bruce L-C [MVP]
9/9/2005 2:36:43 PM
No, in the Jump to URL (look below the Jump to Report). You can jump to any
URL but that URL can be a report which is how I use it. You have much more
control with the Jump to URL. You can show or not show the toolbar, you can
choose to render in a different format (like PDF or CSV). You can cause
another window to open up. For instance this one opens up a report in CSV
ASCII format (from report manager you get Unicode format which Excel doesn't
handle well).

Here is an example of a Jump to URL link I use. This causes Excel to come up
with the data in a separate window:

="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"

If you don't want to have it appear in a new window then do this in jump to
URL:

=Globals!ReportServerUrl & "?/SomeFolder/SomeReport&ParamName=" &
Parameters!ParamName.Value & "&rs:Format=CSV&rc:Encoding=ASCII"

To open up in a new window you must have SP1 or SP2 installed.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services



[quoted text, click to view]

Fredrick A. Zilz
9/9/2005 2:56:47 PM
I set a link up using your advice. my link looks like this:
=Globals!ReportServerUrl & "?/sales reports/customer sales" &"& customer1="&
Fields!customer.Value & "& date1=" & Parameters!date1.Value & "& date2=" &
Parameters!date2.Value

When I use the report, I get a specified server url does not link to the
report server for this report or is not in the correct format. It looks
like the & symbols are not being displayed in the url so that if I look at
my browser address bar after following the link I see something like:
Sales%2520Reports%2fCustomer%2520Salescustomer1%3dVALENTINE%2520ENTERPRISES%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520date1%3d20050901date2%3d20050930%26

The parameters look like they follow immediately after the report name with
no ampersand between them.

Thanks in advance for you assistance.


[quoted text, click to view]

Bruce L-C [MVP]
9/10/2005 12:36:22 AM
Try taking the space out between the ampersand and the parameter. Change
"& customer1=" to "&customer1="

I don't know if that will make a difference but I don't have the space in
there that you do.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Fredrick A. Zilz
9/12/2005 8:44:53 AM
I found that this format works for me:

=Globals!ReportServerUrl + "?/Sales Reports/Customer Sales" + "&customer1="
+ Fields!customer.Value + "&date1=" + Parameters!date1.Value + "&date2=" +
Parameters!date2.Value

Thank you for your assistance.

[quoted text, click to view]

Laetic
10/7/2005 11:03:04 AM
Hi,

I've the same issue with my reports when using "Jump to Report", even with
the new version of RS ... > Will this be fixed in the next version ?

How can we use Jump to URL with parameters set as "null" (i.e. for
picklists, to have "all values") ?

Thanks a lot for your answer !

Laetic

[quoted text, click to view]
Bruce L-C [MVP]
10/7/2005 1:27:17 PM
Sorry, I don't use Null. What I do for pick lists is add and All option and
then in the query I do this:

select * from sometable where (somefield = @someparamter or @someparameter =
'All')

I use a union query to add All to my pick lists.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

AddThis Social Bookmark Button