I've got a drillthrough subreport link in my main report. What I would like to do is have the drillthrough report open in a new window when the user clicks on it. I've tried to find information on how to do this unsuccessfully. [:(] Does anyone know if this
is indeed possible? If so, how?
I'm using RS2000 SP2 with the standard interface (i.e. no asp.net wrapper for the reports - http://webserver/reports) so
LinkTarget wouldn't work since it's only used for the report you're opening and not the parent report...
Any help would be greatly appreciated.
"What can be done with fewer [assumptions] is done in vain with more." Ockham's Razor
Well....for the life of me I couldn't figure this out and trying JavaScript just wasn't working. Turns out I just wasn't doing it right [:P]. All i needed was something like this:
= "javascript:void(window.open('http://www.google.com','_blank'))". Oh well, I hope this saves someone else some time.
"What can be done with fewer [assumptions] is done in vain with more." Ockham's Razor
I have been having the same problem but even when I use this javascript I still cannot get it to work. Once you click on the link the javascript code appears as the URL in the address bar of the same window and I get a "page cannot be displayed" error. If I
shift click the link on the report I get the error in the new window, but then google opens in a new window. It seems to me that my PC can handle the javascript code, but the server or report manager cannot handle it, but I don't know why.
I have tried the same thing directly on the web server and the same results are true.
David,
Read someplace that you need at least SP1 to get Javascript to work.
Also, so we're on the same page, I'm using the Right Click ->Advanced->Navigation->Jump To Url property to do this.
Can you provide more info. on where and how you are placing the Javascript. (Provide the entire contents of the expression). I would have to say that this has more to do w/ where and how you are placing the Javascript and not the report manager or your server
(assuming you already have SP1 or better installed). It almost sounds like you have placed the Javascript in the
Navigation->Jump To Report property instead. This would explain why your code is showing in the address bar, since
Jump To Report essentially uses the path to find the report and display it in the same browser window.
What you want to do is use the Jump To Url to access the report using something like this:
http://servername/reportserver?/SampleReports/Employee Sales Summary&rs:Command=Render&rs:format=HTML4.0. Using the url you could also provide your parameters or format the report in a way that you want and open it in the new browser using the Javascript.
Hope this helps,
Mike
"What can be done with fewer [assumptions] is done in vain with more." Ockham's Razor
We are running SP2 so that should not be a problem.
I am also using the Jump to URL property and as an initial test all I was doing was entering the following expression:-
I have tested a similar expression with the google replaced with one of my reports and the same issue occurs. If I just have a simple hyperlink without the javascript this works fine, but it obviously does not open in a new window. Here is an example of the
expression I used:-
David,
1) Just out of curiousity, are you using the exact expression = "javascript:void(window.open('http://www.google.com','_blank'))" (including double quotes and =)? Noticed that you were missing the
= and " ", wasn't sure if you did this just to show the expression or if that was the exact contents of your expression text.
2) When you tested the Link_Target functionality did it work in the report you opened?
Mike
"What can be done with fewer [assumptions] is done in vain with more." Ockham's Razor
I have tried the expression with and without the = and double quotes.
When using the LinkTarget functionality it did work, although the new window only opens if you click on another hyperlink from the second report. When I tried this I was not using the javascript code just a normal hyperlink to the report with the LinkTarget
function at the end.
David,
One thing I did as a troubleshooting method was view the source of the report (in browser) and check to make sure the tag was being ouput correctly.
For instance, my tag looks like this: <a style="color:Blue" href="javascript:void(window.open('http://www.google.com','_blank'))" TARGET="_top">180054</a>.
Other things you might check: 1) Check for Javascript errors on the bottom left hand side of the browser when the report loads or you click on the link 2) If you've only tried viewing the report in Visual Studio, then try deploying it and viewing it in the
browser. 3) Browser: although i'd think the least likely since the javascript is fairly straight forward, but you never know. I'm using IE 6.0.
I'm at a loss at this point why yours is not working. I didn't have to do anything special to get this to work and can't think of anything else that might be causing you problems.
Mike
"What can be done with fewer [assumptions] is done in vain with more." Ockham's Razor
1) I don't seem to be getting any Javascript errors in the bottom left of my browser either
2) I have tried the report from the browser and from Visual Studio. It actually seems to work in Visual Studio so I am wondering whether there are restrictions on the server that are causing the problem.
3) We have IE6.0 as well
Thanks for all you help and I will investigate the server side which may be the problem.
Through a bit more investigation and some trial and error I have come up with the reason why the javascript is not working. It is something to do with the fact that we have a DNS name for our server. When I access a report from report manager using the actual
server name in the URL and then click on the link it works fine, if I access the reports via the DNS name it fails.
I am not sure how to fix this yet as I need to discuss with our server team/web developers, but at least it gives the answer to the problem.
mikedotnet
Member
115 Points
27 Posts
Drillthrough Report in New Window?
Jun 28, 2005 02:57 PM|LINK
I've got a drillthrough subreport link in my main report. What I would like to do is have the drillthrough report open in a new window when the user clicks on it. I've tried to find information on how to do this unsuccessfully. [:(] Does anyone know if this is indeed possible? If so, how?
I'm using RS2000 SP2 with the standard interface (i.e. no asp.net wrapper for the reports - http://webserver/reports) so LinkTarget wouldn't work since it's only used for the report you're opening and not the parent report...
Any help would be greatly appreciated.
mikedotnet
Member
115 Points
27 Posts
Re: Drillthrough Report in New Window?
Jun 28, 2005 09:22 PM|LINK
= "javascript:void(window.open('http://www.google.com','_blank'))". Oh well, I hope this saves someone else some time.
DavidW
Member
25 Points
5 Posts
Re: Drillthrough Report in New Window?
Jul 07, 2005 02:13 PM|LINK
I have tried the same thing directly on the web server and the same results are true.
Any ideas?
mikedotnet
Member
115 Points
27 Posts
Re: Drillthrough Report in New Window?
Jul 07, 2005 05:11 PM|LINK
Read someplace that you need at least SP1 to get Javascript to work.
Also, so we're on the same page, I'm using the Right Click ->Advanced->Navigation->Jump To Url property to do this.
Can you provide more info. on where and how you are placing the Javascript. (Provide the entire contents of the expression). I would have to say that this has more to do w/ where and how you are placing the Javascript and not the report manager or your server (assuming you already have SP1 or better installed). It almost sounds like you have placed the Javascript in the Navigation->Jump To Report property instead. This would explain why your code is showing in the address bar, since Jump To Report essentially uses the path to find the report and display it in the same browser window.
What you want to do is use the Jump To Url to access the report using something like this: http://servername/reportserver?/SampleReports/Employee Sales Summary&rs:Command=Render&rs:format=HTML4.0.
Using the url you could also provide your parameters or format the report in a way that you want and open it in the new browser using the Javascript.
Hope this helps,
Mike
DavidW
Member
25 Points
5 Posts
Re: Drillthrough Report in New Window?
Jul 08, 2005 01:28 PM|LINK
We are running SP2 so that should not be a problem.
I am also using the Jump to URL property and as an initial test all I was doing was entering the following expression:-
javascript:void(window.open('http://www.google.com','_blank'))
I have tested a similar expression with the google replaced with one of my reports and the same issue occurs. If I just have a simple hyperlink without the javascript this works fine, but it obviously does not open in a new window. Here is an example of the expression I used:-
=Globals!ReportServerUrl & "?/Reports/Client+Exposure&rc:Parameters=False&Link_Target=_blank"
I was using this to test the LinkTarget functionality.
Does this give you any more to explain why I cannot get the javascript to work?
Thanks
David
mikedotnet
Member
115 Points
27 Posts
Re: Drillthrough Report in New Window?
Jul 08, 2005 02:17 PM|LINK
1) Just out of curiousity, are you using the exact expression = "javascript:void(window.open('http://www.google.com','_blank'))" (including double quotes and =)? Noticed that you were missing the = and " ", wasn't sure if you did this just to show the expression or if that was the exact contents of your expression text.
2) When you tested the Link_Target functionality did it work in the report you opened?
Mike
DavidW
Member
25 Points
5 Posts
Re: Drillthrough Report in New Window?
Jul 11, 2005 07:46 AM|LINK
Mike,
I have tried the expression with and without the = and double quotes.
When using the LinkTarget functionality it did work, although the new window only opens if you click on another hyperlink from the second report. When I tried this I was not using the javascript code just a normal hyperlink to the report with the LinkTarget function at the end.
David
mikedotnet
Member
115 Points
27 Posts
Re: Drillthrough Report in New Window?
Jul 11, 2005 04:09 PM|LINK
David,
One thing I did as a troubleshooting method was view the source of the report (in browser) and check to make sure the tag was being ouput correctly.
For instance, my tag looks like this: <a style="color:Blue" href="javascript:void(window.open('http://www.google.com','_blank'))" TARGET="_top">180054</a>.
Other things you might check: 1) Check for Javascript errors on the bottom left hand side of the browser when the report loads or you click on the link 2) If you've only tried viewing the report in Visual Studio, then try deploying it and viewing it in the browser. 3) Browser: although i'd think the least likely since the javascript is fairly straight forward, but you never know. I'm using IE 6.0.
I'm at a loss at this point why yours is not working. I didn't have to do anything special to get this to work and can't think of anything else that might be causing you problems.
Mike
DavidW
Member
25 Points
5 Posts
Re: Drillthrough Report in New Window?
Jul 12, 2005 08:44 AM|LINK
The source code looks fine comparing it to yours although I am not expert in HTML.
<a style="color:Blue" href="javascript:void(window.open('http://www.google.com','_blank'))" TARGET="_top">Javascript</a>
1) I don't seem to be getting any Javascript errors in the bottom left of my browser either
2) I have tried the report from the browser and from Visual Studio. It actually seems to work in Visual Studio so I am wondering whether there are restrictions on the server that are causing the problem.
3) We have IE6.0 as well
Thanks for all you help and I will investigate the server side which may be the problem.
David
DavidW
Member
25 Points
5 Posts
Re: Drillthrough Report in New Window?
Jul 12, 2005 02:39 PM|LINK
Mike,
Through a bit more investigation and some trial and error I have come up with the reason why the javascript is not working. It is something to do with the fact that we have a DNS name for our server. When I access a report from report manager using the actual server name in the URL and then click on the link it works fine, if I access the reports via the DNS name it fails.
I am not sure how to fix this yet as I need to discuss with our server team/web developers, but at least it gives the answer to the problem.
David