user1828513
user1828513

Reputation: 397

Display row with condition in Pentaho Report Designer

Assume I have one data set with following fields: Name, Amount, Time, etc

How can I display only those records with Amount > 100, for example?

Since I need this data set for other report, I can't filter these records when I prepare data set.

I searched around, but couldn't find any answer. I will really appreciate if anyone can help.

By the way, I used Pentaho Report Designer 3.9.

Thanks a lot.

Upvotes: 0

Views: 3850

Answers (1)

marpontes
marpontes

Reputation: 178

Yes, you can.

You have to find your Details Band - not Details Body -, within your Report Structure, and set up the Style Attribute visible the expression:

=if([Amount]>100;true();false())

Besides, if you want your summaries to consider only the shown data, you can also add an Open Formula function field, that would say:

=if([Amount]>100;[Amount];0)

And you'd summarize it at the end of the report.

Here's the link with the full example built to your situation.

Upvotes: 1

Related Questions