Link to home
Start Free TrialLog in
Avatar of cswebdev
cswebdev

asked on

How to display drill through report in new window

I am using report viewer in my asp.net application. I have successfully applied summary report and drill through report. Right now if I click on the item on the summary report the drill through report replaces the summary report. What I want to do is pop the drill through report in a new window.

Avatar of PFrog
PFrog
Flag of United Kingdom of Great Britain and Northern Ireland image

The only way to do this is to build up the URL of the destination report, and then use javascript to open the url.
Unfortunately you can not achieve what you want using the simple 'nagivate to report' destination.

Add the code to the report's custom code, then you can set the destination url of the item to be
   =Code.OpenURL("http://myServer/ReportServer?/Folder/ReportName&ParamName=ParamValue&rs:Command=Render")

Function OpenURL( URL as String) as String
	Return "javascript:void(window.open('" & URL & "','_blank'))"
End Function
 
or, if you want to control the position and details of the window...
 
Function OpenURL( URL as String) as String
	Return "javascript:void(window.open('" & URL & "','_blank','location=no,toolbar=no,left=50,top=50,height=500,width=700'))"
End Function

Open in new window

Avatar of cswebdev
cswebdev

ASKER

I believe to implement your process, I need to have the reports put on the report server. Is not there a way to open the drill through report which is within your application--not in a report server.

Thanks!
Not as far as I'm aware, although I only ever use server based reports so I can't be 100% sure. The javascript method is the only method I have ever found to work as there is no property in SSRS to set to open in a new window.
I will see if your process works without report being put the report server. But I have couple of  questions on the link:
http://myServer/ReportServer?/Folder/ReportName&ParamName=ParamValue&rs:Command=Render"
What is the "ReportServer" in above link? I think its going to be the name of my Virtual directory, is that correct?
On the ReportName do I need to put .rdlc extension?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of PFrog
PFrog
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It could not work for me I will close this question with partial credit