Navigating to other reports or any web URL
- Drag a datafield on the report
- Click on the Textbox
- Find the Action property of Textbox the property window
- Select Go to URL option
- Type any valid URL (i.e. http://binaryworld.net/Main/CodeDetail.aspx?CodeId=3668), valid URL must start with protocol like http: ,ftp:, mailto: ...
Opening Link in a new window
Well this is very common requirement but unfortunately there is no direct option available in Reporting Services Designer. You can do that using the following technique
Use the following expression in the "Go to URL"
="javascript:void(window.open('http://binaryworld.net/Main/CodeDetail.aspx?CodeId=3668','_blank'))"
How to overcome expression length limitation (Dynamicly generate hyperlink)
Another limitation of "Go to URL" field is you are limited to Maximum expression characters. You can solve this problem by using "Dummy parameters". You can create parameters for report without any prompt string and then specify default value which will act as a constant for your report.
For example if I have a really long URL which is not allowed in the "Go to URL" expression then I can create a new report parameter called CW_URL. Set your long URL as default value for this parameter. Now remove any prompt string for this parameter so it wont appear when you run your report.
default value for cw_url => http://binaryworld.net/Main/CodeDetail.aspx?CodeId=
Now you can type the following expression in "Go to URL" to get dynamic URL based on Database field called CodeID and static URL from cw_url hidden parameter.
="javascript:void(window.open('"
& Parameters!cw_url.Value & Fields!CodeId.value & "','_blank'))"
本文介绍如何在SQL Server Reporting Services (SSRS)中创建动态超链接,包括使用GotoURL属性设置固定网址及通过表达式生成动态网址的方法。此外还提供了解决表达式长度限制的方案,例如利用隐藏参数来构建长网址。

404

被折叠的 条评论
为什么被折叠?



