我有一个条形图,其中系列有一个动作"Go To URL"来转到详细报告 .
该行动的表达方式是:
="http://servername/sites/testsite/Dashboards/TestDashboard/TestDetail.aspx?SelectedMonth=" + Replace(Parameters!DateCalendarYear.Value, "&", "%26") + "&SelectedCategory=" + Replace(Fields!Category.UniqueName, "&", "%26"))
当我在SSRS Sharepoint集成模式下运行报表时,它会生成url但不会将&替换为编码值%26 . 我在SSRS本机模式下运行的类似报告上对此进行了测试,它运行正常 .
有人知道为什么Replace功能不适用于在SSRS sharepoint集成模式下运行的报告吗?
SSRS Native中生成的URL(正确工作):
http://servername/sites/testsite/Dashboards/TestDashboard/TestDetail.aspx?SelectedMonth=%5BDate%5D.%5BCalendar%20Year%5D.%5BMonth%5D.%26%5B2014%5D%26%5B4%5D&SelectedCategory=%5BCategory%5D.%5BCategory%5D.%26%5B6%5D
SSRS Sharepoint集成模式中生成的URL(不起作用):
http://servername/sites/testsite/Dashboards/TestDashboard/TestDetail.aspx?SelectedMonth=%5BDate%5D.%5BCalendar%20Year%5D.%5BMonth%5D.&%5B2014%5D&%5B5%5D&SelectedCategory=%5BCategory%5D.%5BCategory%5D.&%5B3%5D
1 回答
由于我打算在新标签中打开报告,无论如何在这里找到了解决方案:http://social.msdn.microsoft.com/Forums/en-US/6ca4b1d4-3a04-413b-bd31-856aac3d8a8c/how-to-open-url-in-new-tab-rather-than-new-window-in-ssrs-2008-r2?forum=sqlreportingservices
生成url时使用了javascript转义函数的参数 .