question

Mrs_Fatherjack avatar image
Mrs_Fatherjack asked

Open Url in new window and pass in parameters

I am working on reporting services and have a report called 'Dashboard' that summarises the content of other reports. There are 2 fields that are used to open the new reports, both open the URL in a new window, one opens it with the default parameters, the second needs to have different parameters passed in. The field opening the URL in a new window is working fine, this is the code: ="javascript:void(window.open('" & Fields!ReportURL.Value & "&rs:Command=render&rc:Parameters=true','_blank'))" The field that should open the report with set parameters is still opening using the default parameters, the code I've used for this is: ="javascript:void(window.open('" & Fields!ReportURL.Value & "&rs:Command=render&bViewExceptions=2&','_blank'))" The parameter is bViewExceptions. The URL to open the report is stored in the field ReportURL. Does anyone have any ideas how I can get the second field with the parameters to override the default values as I'm tearing my hair out. Many thanks.
reporting_servicesurl
5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image Fatherjack ♦♦ commented ·
can you add two columns to the report and simply display the two URLs and then copy/paste them into a browser and get the functionality you are trying for? If not then the URL is being formed badly and needs changing. Once it displays as text and will work as a pasted link them work on getting it clickable
1 Like 1 ·
Mrs_Fatherjack avatar image Mrs_Fatherjack commented ·
I have just worked it out; the URL I set in the table was: 'http://hbm044exesql10/Reports/Pages/ Report.aspx?ItemPath=%2fNew+Reports%2fSX_Report145' when it should be: 'http://hbm044exesql10/ReportServer/Pages/ ReportViewer.aspx?%2fNew+Reports%2fSX_Report145' Many thanks for all the help, next time I'll try to ensure I give ALL the relevant information!!
1 Like 1 ·
Fatherjack avatar image Fatherjack ♦♦ commented ·
what is the result if you remove the **,'_blank'** from the 2nd version?
0 Likes 0 ·
Mrs_Fatherjack avatar image Mrs_Fatherjack commented ·
No difference, it comes up the same as it did before.
0 Likes 0 ·
Mrs_Fatherjack avatar image Mrs_Fatherjack commented ·
Will give this a go. Thank you
0 Likes 0 ·

1 Answer

·
Scot Hauder avatar image
Scot Hauder answered
Add &rs:ClearSession=true as one of your parameters :)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mrs_Fatherjack avatar image Mrs_Fatherjack commented ·
I put it in as below and it's still opening the default values: ="javascript:void(window.open('" & Fields!ReportURL.Value & "&rs:ClearSession=true&rs:Command=render&bViewExceptions=2&rs:ClearSession=true'))"
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.