[英]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.我正在尝试从报告服务中的报告创建一个“弹出窗口”window,它将显示我仪表板上的图表的扩展视图。 I have managed to get it to open in a new window using:
我设法让它在新的 window 中打开,使用:
="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.我想要实现的是最小的 window,尽可能少可见,即(没有工具栏、导航按钮等),大小为 600pt x 300pt,位于屏幕中央。
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 我设法解决了问题,我在MS Developer Network上找到了这篇文章,详细介绍了OPEN方法: http : //msdn.microsoft.com/zh-cn/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.我认为能够在 URL 中传递参数非常重要。这是一个示例。 Please note the & for string concatenation
请注意用于字符串连接的 &
="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'))" ="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'))"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.