Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

reporting services - SSRS open link in another browser tab

I am trying to open a report into another tab in the same browser. I have tried the following with no success

="javascript:void(window.open('http://xxx-xxxxxxxxx/Reports/report/Ventes/subrptRevenuParSuccusale&rs:Command=Render')"

it always give me the path of the element is not valid ..... Then I tried

="javascript:void(window.open('http://xxx-xxxxxxxxx/Reports/report/Ventes/subrptRevenuParSuccusale')"

Works fine, the I tried to pass a paramneter, but no success

="javascript:void(window.open('http://xxx-xxxxxxxxx/Reports/report/Ventes/subrptRevenuParSuccusale&rs:Command=Render&TransNo="+Fields!TRANSACTIONNO.Value+"')"

The minute I add the section &rs:Command=Render....., nothing works Can someone explain to me what I am missing here and why it is not working as it should

Thanks

question from:https://stackoverflow.com/questions/65889037/ssrs-open-link-in-another-browser-tab

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You need to reference the SSRS reportserver not, the SSRS portal address

Something like this

http://myServerName/reportserver/?%2FMY%20FOLDER%2FMY%20REPORT%20NAME&myParameterName=1234

This will open The report in the MY FOLDER folder called MY REPORT NAME and pass in 1234 to the parameter called myParameterName

I find it easier to build these as expressions in the URL expression. Here's an exmaple

=Globals.ReportServerUrl
+ "?/myFolder/my+Report+Name" 
+ "&CountryID=" + cStr(Fields!CountryID.Value)
+ "&CategoryID=" + cStr(Fields!CategoryID.Value)
+ "&RecordedPeriodID=" + cStr(Parameters!PeriodID.Value)
+ "&rc:Parameters=Collapsed"

Here we want to to open the "my report name" report from "my folder" and pass in 3 parameters, finally I set a property to hide the parameters panel.

Note: I used the built-in SSRS Globals!ReportServerUrl variable to get the server name so it works on development and production servers with no modification required.

Wrap this in you javascript window.open and it should work.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...