Reputation: 167
I have created a place holder within the report, which reports gets the total of transactions that are confirmed. But, I get an error. The exact message is: The value of expression for the textbox 'textbox3' refers directly to the field status without specificyng the dataset aggregate. When the report contains multiple datasets, field references outside of the data region must be contained within aggregate functions which specify a dataset scope.
=Sum(IIF(Fields!status.Value = "Pending", Fields!price.Value,NOTHING), "Dataset1″)
Instead it gives me the option of First(Fields!status.Value)
, which does not make any sense, as I want to iterate through all oders that are pending and get their total.
How do I resolve this?
Upvotes: 0
Views: 993
Reputation: 31785
Sounds like your report has multiple datasets.
It also sounds like textbox3 is in a container that doesn't specify a dataset.
Try specifying dataset1 for the tablix that contains textbox3 (the property is DataSetName).
Then try this for the placeholder expression:
=Sum(IIF(Fields!status.Value = "Pending", Fields!price.Value,0.0))
Upvotes: 1