Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: How to display a param in a txt component

  1. #1
    Join Date
    Nov 2017
    Posts
    10

    Thumbs up [Resolved] How to display a param in a txt component

    Hello, I work with Pentaho since 2 weeks. I have a "simple" problem, let me explain :

    I want to display a parameter in a Text component (for a Title):


    Name:  titre erreur.PNG
Views: 90
Size:  7.5 KB


    But as you can see I always have this error : Error processing component (myparam)

    I tried a lot of simple function like this (worked well without param) :

    Name:  func.PNG
Views: 94
Size:  4.1 KB




    I hope someone can help me plz






    If you want to see important parameters,

    Layout :

    Name:  html.jpg
Views: 85
Size:  2.9 KB

    Param i want to display :

    Name:  param ok.PNG
Views: 88
Size:  5.7 KB

    text component :

    http://hpics.li/3b93197


    Chart component :
    Attached Images Attached Images  
    Last edited by Yupla; 11-13-2017 at 05:21 AM.

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    Try:

    function test()
    {
    return "My Parameter: " + team_bar_param;
    }

    Place the param also in the Listeners so that when parameter change also the text changed

  3. #3
    Join Date
    Nov 2017
    Posts
    10

    Default

    Hello @johanhammink, first Thank you for your answer (very fast). I tried your function and I have the same error : Error processing component

    When i check the console it's impossible to find something

  4. #4
    Join Date
    Nov 2009
    Posts
    688

    Default

    This script is working for me.
    You places the scipt in the Expression of the Text Component? Also the name of the parameter is exact the name you places in the script?
    What is your setting "RequireJS Support" It is disaibled for me

  5. #5
    Join Date
    Nov 2017
    Posts
    10

    Default

    Quote Originally Posted by johanhammink View Post
    This script is working for me.
    You places the scipt in the Expression of the Text Component? Also the name of the parameter is exact the name you places in the script?
    What is your setting "RequireJS Support" It is disaibled for me
    It work with :

    function () {
    document.getElementById('IN_team_bar_txt_html').innerHTML = 'Team (<font color=red>'+team_bar_param+'</font>)';
    }

    The solution was to disabled RequireJS Support !!

    You save my life Thank you a lot

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.