0
votes

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?

1
What happens if you remove the "Dataset1″ param in that Sum?mindparse
Well it still doesn't work. It still gives me the error as mentioned earlier.user2684009
When the error is displayed, I guess on the preview tab too, does it mention this placeholder as the source of the error?mindparse
Yes it does...and it says that the scope is invalid.user2684009
Is this place holder inside a tablix or some other container?Tab Alleman

1 Answers

1
votes

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))