简体   繁体   English

链接到SSRS报告以导出/渲染到Excel

[英]Link on SSRS Report to Export / Render to Excel

I'm trying to add a link to an SSRS R2 Report that should open the report in Excel. 我正在尝试添加指向SSRS R2报告的链接,该链接应在Excel中打开报告。

Many sites suggest to add a text box with a link that uses the following expression 许多网站建议添加带有以下表达式的链接的文本框

=Globals!ReportServerUrl &  Globals!ReportFolder & "/" & Globals!ReportName & "&rs:Format=excel"

So I did. 所以我做了。 SSRS works. SSRS有效。 The Report rendered in SSRS/IE works. 在SSRS / IE中呈现的报告有效。 But if I click the text box to open it in Excel, it does not work. 但是,如果我单击该文本框以在Excel中打开它,它将无法正常工作。 The expression is 'calculated' correctly and returns the correct path, but IE returns an error "HTTP 400 bad Request" "The webpage cannot be found" 表达式已正确“计算”并返回正确的路径,但IE返回错误“ HTTP 400错误的请求”“找不到网页”

Any suggestions why this happens? 有什么建议为什么会发生这种情况? I double checked server names and paths as well as manually tried a variety of URL combinations, but it never exports to excel. 我仔细检查了服务器的名称和路径,并手动尝试了各种URL组合,但从未导出到excel。 The "standard" drop-down save as excel does work tough. “标准”下拉菜单保存为excel确实很难。

Thanks! 谢谢!

A couple of things to try. 有几件事可以尝试。

Use fiddler to capture the http request when you click export to excel. 当您单击导出到excel时,请使用fiddler捕获http请求。

That should give you the correct URL you are looking for. 这样可以为您提供所需的正确URL。 Once you have that, just drop it into your browser of choice and see if it works. 有了它之后,只需将其放到您选择的浏览器中,看看它是否有效。

Next put the URL into an SSRS report as a link and try again. 接下来,将该URL作为链接放入SSRS报告中,然后重试。 once that is working go for the calculated option. 一旦可行,就去计算选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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