SSRS超链接表达式

时间:2017-02-01 01:41:07

标签: reporting-services

我想了解是否可以在Action设置中的SSRS中设置条件超链接表达式。

我目前使用的代码是

 =iif(First(Fields!IsHosted.Value, "ReportServer") = "Y",       First(Fields!ServerName.Value, "ReportServer"), Globals!ReportServerUrl) + 
"/Pages/ReportViewer.aspx?" + Globals!ReportFolder + "/" +
code.GetTargetReportName("Student Performance Against Goal Drill") +
"&GoalCol=" + Code.URLEncode(Parameters!GoalCol.Value) + 
"&SectionCol=" + Code.URLEncode(Parameters!SectionCol.Value) +
"&TargetCol=" + Code.URLEncode(Parameters!TargetCol.Value) +
"&ItemCol=" + Cstr(Fields!Item.Value)

我只想说“如果字段B = 0则不执行任何操作,否则请使用上述内容。我不熟悉如何在操作中包装此语句。

1 个答案:

答案 0 :(得分:0)

您可以嵌套IIF()个功能:

=IIF(First(Fields!B.Value,"ReportServer") = 0,Nothing,
iif(First(Fields!IsHosted.Value, "ReportServer") = "Y",First(Fields!ServerName.Value, "ReportServer"), Globals!ReportServerUrl) + 
"/Pages/ReportViewer.aspx?" + Globals!ReportFolder + "/" +
code.GetTargetReportName("Student Performance Against Goal Drill") +
"&GoalCol=" + Code.URLEncode(Parameters!GoalCol.Value) + 
"&SectionCol=" + Code.URLEncode(Parameters!SectionCol.Value) +
"&TargetCol=" + Code.URLEncode(Parameters!TargetCol.Value) +
"&ItemCol=" + Cstr(Fields!Item.Value)
)

我不知道数据集结构是什么,但这可以帮到你。