在URL地址栏中传递参数(对于Sql报告)

时间:2014-09-11 12:07:09

标签: javascript sql-server visual-studio-2013 lightswitch-2013

我很难在URL地址栏上传递参数...

继承人我所拥有的:

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

ProjectReference是报表生成器的参数..我在这里做错了什么?

1 个答案:

答案 0 :(得分:0)

解决了这个问题,您必须使用ReportServer网址链接,而不是报告本身......

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");