all groups > sql server reporting services > november 2004 >
You're in the

sql server reporting services

group:

How to pass parameters in Jump to URL using javascript


Re: How to pass parameters in Jump to URL using javascript Bruce L-C [MVP]
11/23/2004 1:51:29 PM
sql server reporting services:
Please post what you have in your Jump to URL.

--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

How to pass parameters in Jump to URL using javascript DC
11/23/2004 1:57:05 PM
Problem Statement: Open a sub-report in a pop-up window with specific
dimensions AND BE ABLE TO PASS PARAMETERS TO IT !!!

Background: I know that there have been many solutions offered to open a
popup sub-report. I was able to do that too.

Issue: I need to pass in a parameter, which will be the field ID of the link
from the sub-report is launched. So, the parameters have to be dynamically
concatenated to the javascript URL somehow. Now to complicate things more,
the Fields!Fieldname syntax doesn't seem to get evaluated properly within
the "Jump to URL" box. It gets treated as a string.

Alternate solutions: If I use the simple "Jump to Report" option, this will
not get complicated but somebody needs to tell me how to pop it up in a new
window with specific dimensions.

Re: How to pass parameters in Jump to URL using javascript Jeff A. Stucker
11/23/2004 2:43:31 PM
Step back a bit. The Jump To is parsed on the server, and the javascript is
parsed on the client. It should work.

--
'(' Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------
[quoted text, click to view]

Re: How to pass parameters in Jump to URL using javascript Bruce L-C [MVP]
11/23/2004 2:53:28 PM
OK, I see what is happening. All you need to do is

"http://" & Globals!ReportServerUrl &
"/ReportServer?%2fReporting+POC%2fFinancial+Benefits+Detail&CharterId=" &
Fields!fieldname.value

What you are doing is assembling the string. RS is not doing any
interpretation of the values in the string, it just passes the string on so
if you are using parameters, field values, globals etc you need to append to
the string constants.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services


[quoted text, click to view]

Re: How to pass parameters in Jump to URL using javascript DC
11/23/2004 3:29:14 PM
Bruce,

Thank you for asking. Here is what I have -

javascript:void(window.open("http://dlog/ReportServer?%2fReporting+POC%2fFin
ancial+Benefits+Detail&CharterId=423", "popup",
"location=no,toolbar=no,left=100,top=100,height=600,width=800"))

I need the CharterId parameter to be passed dynamically. Also, while we are
on the same problem, I need a way to dynamically use the reportserver name
here since I do not want to hardcode it. I know that there are global
variables to resolve that but they do not seem to work within the "Jump to
URL" box.

Thanx,
DC

[quoted text, click to view]

Re: SOLUTION: How to pass parameters in Jump to URL using javascript Jeff A. Stucker
11/23/2004 3:55:02 PM
Glad you got it working!

Cheers,

--
'(' Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------
[quoted text, click to view]

Re: How to pass parameters in Jump to URL using javascript DC
11/23/2004 4:28:20 PM
Bruce,

I agree with what you have done but you are missing the "popup window
dimensions" part !! I need to open this report in a popup with specific
dimensions. If I specified your string concatenation method within the
javascript call, it will not parse any RS variables. So, what else can you
suggest ?

DC

[quoted text, click to view]

Re: How to pass parameters in Jump to URL using javascript DC
11/23/2004 5:06:31 PM
Jeff,

I agree. That "should" work but it doesn't. As a matter of fact, I
eliminated the javascript part. I just gave what Bruce suggested and here is
what I get -

Reporting Services Error
----------------------------------------------------------------------------
----

a.. Exception of type
Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
thrown. (rrRenderingError) Get Online Help
a.. Exception of type
Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
thrown.
a.. Invalid URI: The URI scheme is not valid.

What would you do ?

DC


[quoted text, click to view]

Re: How to pass parameters in Jump to URL using javascript Bruce L-C [MVP]
11/23/2004 5:09:49 PM
I would suggest backing up a bit and first make sure that you can get the
appropriate string. You need to first have confidence that the string is
correct, that it will bring up the report that you want. You are trying to
do everything at once. The below looks to me like something isn't quite
right with your string. Here is an example of a jump to URL string that I
have:

=Globals!ReportServerUrl & "?/Inventory/Similar Loads&Manifest=" &
First(Fields!manifstdocno.Value, "LoadID") &"&WasteIDNum=" &
First(Fields!wasteidnum.Value, "LoadID")

I just noticed that I am using a different way of invoking the report than
you. The reason I use the above format is that I want to have the parameter
prompt to show when the report comes up (with the value filled in). This
allows the user to then change it if they want to. I think you got the error
because of a mix of different ways to invoke the report. Try first without
the Globals but with the dynamic field reference. Make sure it works without
using the javascript. Then solve the problem of filling in the server name
dynamically. Finally, add back in the javascript.

I think that all of this will work. You just need to solve one problem at a
time.

--
Bruce Loehle-Conger
MVP SQL Server Reporting Services


[quoted text, click to view]

Re: How to pass parameters in Jump to URL using javascript DC
11/23/2004 5:10:33 PM
I strongly recommend anybody who is answering to this query to test this on
their machines and then answer. It is not as simple as it looks.


[quoted text, click to view]

Re: SOLUTION: How to pass parameters in Jump to URL using javascript Bruce L-C [MVP]
11/23/2004 5:12:43 PM
OK, I see we ended up with two threads. Didn't notice this. Disregard my
last (and unneeded) suggestion. Glad you got it all working.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

SOLUTION: How to pass parameters in Jump to URL using javascript DC
11/23/2004 5:45:02 PM
Bruce/Jeff,

Thank you for the help and tips. I appreciate it. It was my bad that it
didn't work. I am posting the solution here so that others can learn how to
do this -

="javascript:void(window.open('" & Globals!ReportServerUrl &
"?%2fReporting+POC%2fFinancial+Benefits+Detail&rc:ToolBar=False&rc:Parameter
s=False&CharterId=" & Fields!CharterID.Value & "', 'popup',
'location=no,toolbar=no,left=100,top=100,height=600,width=800'))"

DC


[quoted text, click to view]

AddThis Social Bookmark Button