Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: how to convert english number to marathi number in pentaho report

  1. #1
    Join Date
    Feb 2010
    Posts
    114

    Question how to convert english number to marathi number in pentaho report

    I want to convert english number in to marathi locale numbers on runtime when report generates.

    any idea???


    for example

    english numbers :- 1 2 3 4 11 12 13

    output in pdf is :- १ २ ३ ४ ११ १२ १३

    http://www.google.com/transliterate/marathi

    also if date is 12/3/2012 (dd/mm/yyyy) in english

    then i want output is :- १२ मार्च २०१२ or १२/०३/२०१२ i.e. in english is 12 march 2012

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    There is only one way: You have to do it manually by writing code (BSHExpression). We do not have any support for transliteration in our product.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Feb 2010
    Posts
    114

    Default

    you know any expression example. please send me

  4. #4
    Join Date
    Feb 2010
    Posts
    114

    Default

    I have added simple BSHExpression in pentaho report designer for column contactdetails_id but not working. please help if any error


    Object getValue()
    {
    Number contactValue = (Number) dataRow.get('contactdetails_id');

    Number totalvalue = contactValue * 100;
    return new Number(totalValue);
    }

  5. #5
    Join Date
    Feb 2010
    Posts
    114

    Default

    Dear Taqua ,

    Now work for following code

    Object getValue()
    {
    if(dataRow.get("numberValue").equals("7"))
    return "hi";
    else
    return "hello";
    }


    but not work for following code, it gives NULL value. please help me..........

    Object getValue()
    {
    NumberFormat nf = NumberFormat.getInstance();
    DecimalFormat df = (DecimalFormat) nf;
    DecimalFormatSymbols dfs = df.getDecimalFormatSymbols();
    dfs.setZeroDigit('\u0966');
    df.setDecimalFormatSymbols(dfs);
    return df.format(123456);
    }
    Last edited by nileshp; 05-04-2012 at 05:07 AM.

  6. #6
    Join Date
    Feb 2010
    Posts
    114

    Default

    finally got solution thanks taqua .....

    I have not added import java.text for formater

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.