0
votes

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 i.e. a sub report. 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?

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

Yes I know how does this url know which values report 1 (main report) took. 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.

So any direction, advice is greatly appreciated. Thanks.

1

1 Answers

0
votes

In the placeholder that is the link on the parent report (Report 1) you can use a formula to generate the 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.