简体   繁体   English

共享点模式SSRS将报告参数从一个报告传递到第二个报告,以PDF格式直接呈现

[英]Sharepoint mode SSRS passing report params from One report to second report to render directly in pdf format

I have to build a url and put in report 1 (the main report) for report 2. Report 2 takes all params from Report 1 ie a sub report. 我必须构建一个URL并放入报告2的报告1(主报告)中。报告2接受报告1中的所有参数,即子报告。 And on report 1 put something along the lines of "click her to view pdf version" I have the ssrs url built for report 2. Where I'm stuck is HOW I pass params from report 1 to report 2 in the URL? 然后在报告1上加上“单击她以查看pdf版本”的内容,我为报告2构建了ssrs url。我遇到的困难是如何在URL中将报告1的参数传递给报告2?

http://[mainsite]/[sub-site]/_vti_bin/reportserver?http://[mainsite]/[sub-site]/Reports/RDL/[mainfolder]/[report2name].rdl&rp:P1=Parameters!P1.Value&rp:P2=Parameters!P2.Value&rp:P3=Parameters!P3.Value&rp:P4=Parameters!P4.Value&rs:Format=PDF http:// [mainsite] / [sub-site] / _vti_bin / reportserver?http:// [mainsite] / [sub-site] / Reports / RDL / [mainfolder] / [report2name] .rdl&rp:P1 =参数! P1.Value&rp:P2 =参数!P2.Value&rp:P3 =参数!P3.Value&rp:P4 =参数!P4.Value&rs:格式= PDF

Yes I know how does this url know which values report 1 (main report) took. 是的,我知道此url如何知道报告1(主报告)采用的值。 Hence my question being asked. 因此,有人问我这个问题。

Most of my research lead to hard coded values being passed. 我的大部分研究都导致采用了硬编码的值。 And with that my URL above works fine and pops the option of saving pdf to desired location. 有了这个,我上面的URL可以正常工作,并弹出将pdf保存到所需位置的选项。

So any direction, advice is greatly appreciated. 因此,任何方向,建议都将不胜感激。 Thanks. 谢谢。

In the placeholder that is the link on the parent report (Report 1) you can use a formula to generate the URL. 在作为父报表(报表1)链接的占位符中,可以使用公式生成URL。 That formula could be something like: 该公式可能类似于:

="http://[mainsite]/[sub-site]/_vti_bin/reportserver?http://[mainsite]/[sub-site]/Reports/RDL/[mainfolder]/[report2name].rdl&rp:P1=" & Parameters!P1.Value & "&rp:P2=" & Parameters!P2.Value & "&rp:P3=" & Parameters!P3.Value & "&rp:P4=" & Parameters!P4.Value & "&rs:Format=PDF"

This will stick the parameter values from the parent report into the URL. 这会将父报表中的参数值粘贴到URL中。

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

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