VJ87
VJ87

Reputation: 142

SSRS - Gauge panel error in preview

Im trying to get a colored gauge panel to green/red based on IIF expression for comparing two dates.

This is my expression:

=IIF(Fields!last_Succesful_run.Value > Fields!last_Unsuccesful_run.Value, 1, 0)

1 = green / 0 = red

The report compiles but when viewing the preview the following error is shown:

An error has occurred during data evaluation of the GaugePanel 'foo'.

Upvotes: 0

Views: 1002

Answers (1)

VJ87
VJ87

Reputation: 142

In my case the error occurred because in the dataset there were NULL values.

This works:

=IIF(Fields!last_Succesful_run.Value > (IIF(IsNothing(Fields!last_Unsuccesful_run.Value ), "01.01.2000", Fields!last_Unsuccesful_run.Value)), 1, 0)

01.01.2000 is just an old date for showing purpose

Upvotes: 0

Related Questions