Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: How to display selected rows in pentaho report designer

  1. #1

    Default How to display selected rows in pentaho report designer

    Assume I have one data set with following fields:
    Name, Amount, 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.

    By the way, I used Pentaho Report Designer 3.9.

    Thanks a lot.

  2. #2
    Join Date
    Mar 2012



    you can filter the records at report level , once they are ready from data set .

    Can you please try this once ,

    create two functions :-
    one is at amount level
    =IF([Amount] > 100 ;[Amount];"")

    other is at Name level
    =IF([Amount] <> "";[name]; "")

  3. #3
    Join Date
    Jul 2013


    For your problem,you simply take a numerical field and give the condition like
    =IF(Amount>100;Amount) left the else field blank and you get the Amount greater than 100.

    If you have more than one column then you have to give condition for all the columns.
    example you have unit_cost,unit_price etc column
    then in II numerical field give condition like =IF(Amount>100;unit_cost) and for III column,in numerical field condition like =IF(Amount>100;unit_price)
    and you get all the 3 columns which have Amount>100

    Thanks Buddy

  4. #4

    Default Not working

    I tried the suggestions, but seems not working as I expected.

    It display an empty row for every record with Amount<=100. This is not what I wanted. The main purpose for this is to only show records with Amount>100, so that my table is not very long.

    Any other way to only display records with Amount>100, without too many empty rows?


  5. #5
    Join Date
    Mar 2003


    Use a SQL-where clause and tell your database to only return all rows that are part of your constraint.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  6. #6


    If you can't use a SQL where clause then use the visibility property of the details section. Use a formula like IF([Amount]>100;TRUE();FALSE())

  7. #7


    This solved my problem. Thanks a lot.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.