• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1166
  • Last Modified:

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.

0
cswebdev
Asked:
cswebdev
  • 3
  • 3
1 Solution
 
PFrogCommented:
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

0
 
cswebdevAuthor Commented:
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!
0
 
PFrogCommented:
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
cswebdevAuthor Commented:
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!
0
 
PFrogCommented:
The url is specific for a report server based report
    myServer - the name of the server hosting SSRS
    ReportServer - the IIS share containing the report server
    Folder - optional, if the reports are stored within a sub folder you can specify it here
    ReportName - this is the filename of the report, without the .rdl extension
    ParamName - the name of the parameter you want to set
    ParamValue - the value of the parameter you want to set

I'm really not sure how this would with with an rdlc embedded within an ASP.Net application. For it to work you have to know the URL of the report - do you know that? If not, you could try creating a new page just to host the drillthrough report, and then use the javascript call to open a new window to that page, not sure how you'd pass the parameters though - I'm not an ASP.Net guy!
0
 
cswebdevAuthor Commented:
It could not work for me I will close this question with partial credit
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now