简体   繁体   中英

How do I create a minimal popup window in Reporting Services using JavaScript?

I am trying to create a "popup" window from a report in reporting services which will display an expanded view of a chart that I have on my dashboard. I have managed to get it to open in a new window using:

="javascript.void(window.open('http://My_Server/ReportServer/Pages/ReportViewer.aspx?...&rs:Command=Render','_blank'))"

What I am trying to achieve is a minimal window with as little as possible visible, ie (no toolbars, navigation buttons etc.), sized 600pt x 300pt and positioned in the centre of the screen.

Any help would be greatly appreciated!

I managed to solve my problem, I found this article on the MS Developer Network detailing the OPEN method: http://msdn.microsoft.com/en-us/library/ms536651%28VS.85%29.aspx

So my final code looks like this:

="javascript:void(window.open('http://myServer/ReportServer/Pages/ReportViewer.aspx?...&rs:Command=Render&rc:Toolbar=false', null, 'width=795, height=490, status=no, toolbar=no, menubar=no, location=no'))"

I think its very important to be able to pass a parameter in the URL. Here is an example. Please note the & for string concatenation

  • Report name SummaryDetail Parameter SummaryId

="javascript:void(window.open('http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fSummaryDetail&SummaryId=" & Fields.Id:Value & "&rs:Command=Render&rc,Toolbar=false', null, 'width=795, height=490, status=no, toolbar=no, menubar=no, location=no'))"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM