Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.0k views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...