SSRS Conditional Formatting - Boolean

Hi All,

Does any one know the expression for displaying a table if the value of a boolean is set to true and if it’s set to false (within epicor) then do not display the field.

The field is EUOrder_c on OrderHed

I’ve currently got: =IIF(Isnothing(Fields!EUOrder_c.Value),True,False) I’m using the display options of the table

It’s currently giving me

Thanks again.
Aaron

Based on the error, the field you are referencing is not in the same dataset. Are you passing the EUOrder_c in the RDD?

Hi John,

Yes, the field is visable but I’m aware it needs to be a aggregate statement but not sure how to write it.

What is the name of the dataset it is in?

You could try:

=IIf(IsNothing(Fields!EUOrder_c.Value,"Name of the dataset it is in here"),True,False)

Or use First().

=IIf(IsNothing(First(Fields!EUOrder_c.Value,“Name of the dataset it is in here”) ),True,False)

How would you write the expression?

Hopefully unrelated but when working with an RDL that has multiple datasets, if you move a field from a different dataset than the one that the RDL considers to be the Primary, it will consider that you want that dataset to be the Primary and it makes it so. Then, when you try to use fields from the “primary” dataset in Expressions, you suddenly start getting a similar type of error.
Just make sure you have not done that.
The trick is to just place a field onto the design from the true Primary dataset, save and remove.

It’s all very confusing…

I’m still getting the same error as previously.

Well, if the field EUOrder_c has been added to OrderHed dataset, then what is the dataset specified for the Table that you are trying to “hide”?
image

If it truly is outside scope you can write a custom function to return the value.

Example to get current page number outside of page header:

Public Function PageNumber() As String    
    Return Me.Report.Globals!PageNumber    
End Function
1 Like

Hi Michael,

Still coming up with that error.

Everything is good in terms of the table and fields but this expression is causing some issues? All I want it to do is show the table if EUOrder_c = True and Hide the table if EUOrder_c = False.

Kind regards,
Aaron

Solved it with this little bad boy.

=IIF(First(Fields!EUOrder_c.Value, "OrderHed")=False,True,False)

Woohoo :slight_smile:

Yep, you told us that didn’t you, it was a boolean, nicely done, you nailed it!