我正在创建一个表达式来检查参数的值,然后根据传入的参数值显示一个文本字段。这是我目前的代码
=IIf(Parameters!AssessmentType.Count = 3, "All Assessments",
IIf(Parameters!AssessmentType.Count = 2, IIf(Parameters!AssessmentType.Value(0) = 2 AND
Parameters!AssessmentType.Value(1) = 3, "Initial and Review Assessments",
IIf(Parameters!AssessmentType.Value(0) = 2 And Parameters!AssessmentType.Value(1) = 4,
"Initial and Closing Assessments", IIf(Parameters!AssessmentType.Value(0) = 3
And Parameters!AssessmentType.Value(1) = 4, "Review and Closing Assessments",
IIf(Parameters!AssessmentType.Value(0) = 3 And
Parameters!AssessmentType.Value(1) = 2, "Initial and Review Assessments",
IIf(Parameters!AssessmentType.Value(0) = 4 And Parameters!AssessmentType.Value(1) = 2,
"Initial and Closing Assessments", IIf(Parameters!AssessmentType.Value(0) = 4
And Parameters!AssessmentType.Value(1) = 3, "Review and Closing Assessments","")))))),
IIf(Parameters!AssessmentType.Count = 1, IIf(Parameters!AssessmentType.Value(0) = 2,
"Initial Assessments", IIf(Parameters!AssessmentType.Value(0) = 3, "Review Assessments",
IIf(Parameters!AssessmentType.Value(0) = 4, "Closing Assessments", ""))), "")))
参数具有指定的值2,3和4.以及作为多值参数。该参数还涉及主数据集的过滤器表达式。
当前表达式适用于选择所有三个参数值以及选择任何两个参数值,但是,只要选择单个参数值,就会返回未定义的错误。该表达式位于我的报告的标题中,并且不允许任何故障/错误修复,因为未定义错误类型。
任何帮助总是受到赞赏!!