Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: How to hide Table Component if it contains no rows

  1. #1
    Join Date
    Sep 2017
    Posts
    18

    Default How to hide Table Component if it contains no rows

    Hi,

    I've been trying to find a way to hide a Table Component if it is empty. Do you have any idea?

    Thanks in advanced!

  2. #2

    Default

    In Advanced Properties -> language section Add below code

    {"sZeroRecords": "<your text here>"}

    Pentaho 7.1 & CTools

  3. #3
    Join Date
    Sep 2017
    Posts
    18

    Default

    This works perfectly but what I need to do in order not to display the columns too? for now, i can see no data message but can see columns above it

  4. #4
    Join Date
    Nov 2009
    Posts
    688

    Default

    Create a parameter par with the value the amount of records.
    When no records par = 0
    In your table Component in the Advanced Properties:
    function f() {if (ParNull === "0" ) {$('#'+this.htmlObject).hide();} else {$('#' + this.htmlObject).show();}}

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.