Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 超链接表达式_Reporting Services - Fatal编程技术网

Reporting services 超链接表达式

Reporting services 超链接表达式,reporting-services,Reporting Services,我想了解,如果可能的话,在动作设置中的SSRS中设置一个条件超链接表达式 我目前有效的代码是 =iif(First(Fields!IsHosted.Value, "ReportServer") = "Y", First(Fields!ServerName.Value, "ReportServer"), Globals!ReportServerUrl) + "/Pages/ReportViewer.aspx?" + Globals!ReportFolder + "/" + code

我想了解,如果可能的话,在动作设置中的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,那么什么都不做,否则就使用上面的方法。我不熟悉如何在操作中包装此语句。

您可以嵌套
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)
)

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

这样做的目的是防止用户在值为0时向下钻取到向下钻取报告,并将呈现空报告。要验证的字段不是零?因此,字段A是钻取操作-有另一列(字段B)-如果字段B=0,则字段A上的钻取操作不应执行任何操作,否则字段A上的钻取操作应按照该操作进行钻取。这是经过修改的URL,但它报告了预期的语句结尾。不确定缺少的语法在哪里。=IIF(First(Fields!NoOfStudents.Value,“RSItemPerformanceAgainstGoal”)=0,nothing,IIF(First(Fields!IsHosted.Value,“ReportServer”)=“Y”,首先(Fields!ServerName.Value,“ReportServer”),Globals!ReportServerUrl)+“/Pages/ReportViewer.aspx?”+Globals!ReportFolder+“/”+code.getTargetReportReportName(“学生对目标训练的表现”)+”&GoalCol=“+code.URLEncode(Parameters!GoalCol.Value)+”和SectionCol=“+code.URLEncode(参数!SectionCol.Value)+“&TargetCol=“+Code.URLEncode(参数!TargetCol.Value)+”&ItemCol=“+Cstr(字段!Item.Value)))@jasonbarry,我已经更新了表达式,只是删除了一个附加的括号。试试看。不,不行。它报告了一个无效的作用域parameter@jasonbarry,第一个函数的作用域中似乎有错误。请检查第二个参数,即传递给第一个函数的数据集名称,如果re每个参数都与您拥有的一个数据集的名称匹配。