Javascript 在URL地址栏中传递参数(用于Sql报表)

Javascript 在URL地址栏中传递参数(用于Sql报表),javascript,sql-server,visual-studio-2013,lightswitch-2013,Javascript,Sql Server,Visual Studio 2013,Lightswitch 2013,我正在努力传递URL地址栏上的参数 以下是我所拥有的: http://win-t8o9hquvjcf/Reports/Pages/Report.aspx?ItemPath=%2fDatasheetforOMManual&ProjectReference=65656 ProjectReference是报表生成器中的参数。。我做错了什么?解决了这个问题,你必须使用ReportServerURL链接,而不是报告本身 http://yourservername/ReportServer/Pag

我正在努力传递URL地址栏上的参数

以下是我所拥有的:

http://win-t8o9hquvjcf/Reports/Pages/Report.aspx?ItemPath=%2fDatasheetforOMManual&ProjectReference=65656

ProjectReference是报表生成器中的参数。。我做错了什么?

解决了这个问题,你必须使用
ReportServer
URL链接,而不是报告本身

http://yourservername/ReportServer/Pages/ReportViewer.aspx?%2fdatabasename%2freportname&rs:Command=Render&parameter=1
添加
&rs:Format=PDF
将其显示为PDF

对于Lightswitch,其工作原理如下:

var param1 = screen.tablename.param1
window.open("http://yourservername/ReportServer/Pages/ReportViewer.aspx?%2fdatabasename%2freportname&rs:Command=Render&parameter=1" + param1 + "&rs:Format=PDF");