0
votes

I have 3 datasets in my project. I am trying to create an expression in a standalone textbox that reports "Error Found!" if the field.value is populated and "No Errors" if the field.value is blank.

=SUM(IIF(Fields!Account.Value = "","No Errors","Errors Found!"),"Account")

This is kicking back a "Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope." error.

To avoid issues with multiple datasets, I added the SUM and the "Account" to reference the correct dataset.

If I were to replace my TRUE/FALSE with "1,0", the expression works.

1

1 Answers

0
votes

Try:

=IIF(Isnothing(First(Fields!Account.Value,"Account")),"No Errors","Errors Found!")

Or you can use:

=IIF(CountRows("Account")=0,"No Errors","Errors Found!")

Where Account is the name of the dataset.

Let me know if this helps.