Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Pentaho Report Designer - Display Currency Symbol and Format Number locale wise

  1. #1
    Join Date
    Oct 2013
    Posts
    216

    Post Pentaho Report Designer - Display Currency Symbol and Format Number locale wise

    Hello,
    In Pentaho Report Designer 6.1.0.1-196, Bar Chart - I want to display number with currency symbol. Now in Currency symbol can be before or after number, for example $15000(dollar) or 15000₫(dong). I want to make it dynamic as currency symbol coming from database column.
    I also want to make that number format depends on locale like for 15000 value if locale 'en-GB' will be "15,000" while for 'vi_VN' it will be "15.000".
    Also this will be in numeric datatype as it would be use as value column for bar chart.
    How to handle this in Pentaho Report Designer ?

    Thanks in advance.
    -- NITIN --

  2. #2
    Join Date
    May 2016
    Posts
    282

    Default

    A combination of CONCATENATE and IF functions:
    CONCATENATE(IF([CURRENCY]="$";[CURRENCY];"");[AMOUNT];IF([CURRENCY]="₫";[CURRENCY];""))
    Changing locale for amount and getting aggregation to work at the same time can be tricky, I don't know if it would be possible in the report, if you can do the aggregation in the database, then you can convert the amount to text and format it to your needs.
    Regards
    OS: Ubuntu 16.04 64 bits
    Java: Openjdk 1.8.0_131
    Pentaho 6.1 CE

  3. #3
    Join Date
    Oct 2013
    Posts
    216

    Default

    Yes, Ana.
    Right now I am doing the same things, to use above formula with currency.
    But to use for Bar chart if I am going to use this it will not work as it is become a string.
    Same is happening with Locale also. It is converting number to string.
    -- NITIN --

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.