I have a dataset in JasperReports report which has two fields ID and Name.
And I want to write Filter Expression for the report itself ie the report should be displayed only if all the Name values on the dataset has string "Success".
Lets say, I have two tuples in the dataset like
Case 1:
(1,'Failure')
(2,'Success')
Case 2:
(1,'Success')
(2,'Success')
Actual Result:
Case 1 & Case 2: report is displayed
Expected Result:
Case 1: report should be displayed
Case 2: report should not be displayed.
My Expression:
"Success".equals($F{Name}) ? Boolean.TRUE : Boolean.FALSE
My current expression returns true even if anyone of the Name field has "Success" string.
Hence I need a valid expression which provide me the above expected results.
Please help me.