我收到以下错误:
Error 1 [rsInvalidAggregateScope] The Value expression for the text box
‘Textbox2’ has a scope parameter that is not valid for an aggregate function.
The scope parameter must be set to a string constant that is equal to either
the name of a containing group, the name of a containing data region, or
the name of a dataset.
我的 Textbox2 背后的表达式(为了便于阅读,我添加了一些空格):
Iif(Parameters!ReportParameterPersoneelsNr.Value.Equals(String.Empty),
"Prestaties " + First(Fields!firmanaam.Value, "DataSetHrm") +
"(" + First(Fields!indienstfirmanr.Value, "DataSetHrm") + ")",
"Prestaties " + First(Fields!naam.Value, "DataSetHrm") + " " +
First(Fields!voornaam.Value, "DataSetHrm") +
"(" + First(Fields!personeelsnr.Value, "DataSetHrm") + ")")
田野:
ReportParameterPersoneelsNr = Reportparameter of type Text
firmanaam.Value = VARCHAR
indienstfirmanr.Value = Long
naam.Value = VARCHAR
voornaam.Value = VARCHAR
personeelsnr.Value = Long
在 Stackoverflow 上的搜索给我带来了以下结果。但到目前为止,他们还没有帮助我解决我的问题
帖子 1:对于聚合函数的意义而言,范围参数是什么意思是无效的
有人可以指出我做错了什么吗?
注意:到处添加 tostring() 没有帮助
注 2:将 '+' 替换为 '&' 也不能解决问题
注意 3:数据集名称是正确的,并且数据集是此 SSRS 报告中唯一存在的数据集:
更新:数据集包含的数据有效,读取数据集不起作用(尝试使用和不使用别名)