How can I “specify a dataset aggregate” in this SSRS Expression?

末鹿安然 提交于 2019-12-01 18:37:50

It sounds like your Textbox has been added to an area of the report that isn't a "data region" (e.g. a table or list). A data region will have a reference to a particular report dataset as one of it's properties, so Reporting Services knows all field references inside that data region refer to that dataset. What this error is trying to say (in a rather verbose way) is:

  • if you reference a field outside of a data region, that reference needs to be inside an aggregate expression such as Sum() - this is because the dataset may contain multiple rows for the field but outside of a data region a textbox can only display a single value.
  • this aggregate expression must also include a reference to the report dataset that the field is coming from

So if field "WK1" was from dataset "MyDataset1", the expression to reference that field would look like:

=Sum(Fields!WK1, "MyDataset1")

See also: Using Dataset Fields Collection References in Expressions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!