Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Custom Formatter for Dimension : Class Implemenation

  1. #1
    Join Date
    Jul 2016
    Posts
    2

    Default Custom Formatter for Dimension : Class Implemenation

    Hi All,

    I am new in Pentaho world, I have used schema workbench for creating schema for our report. In this we now want to have following format for one numeric field (It's dimension)
    Field current value is 10236
    Now we want one standard for having comma as thousand separator.. so it will be 10,236.

    In schema workbench I tried to have property #,### in formatter field but it wont work even tried java script implementation which won't work. Can some one give me idea / steps to achive this change?
    Do I need to prepare custom class which implements MemberFormatter? I am now sure where to put that class file after compilation.

    Thanks in Advance.
    Chetan.

  2. #2
    Join Date
    Jul 2016
    Posts
    2

    Default

    Hi,

    What we have tried till time is, use of MDX implementation inside schema workbench xml, We used following thing with our dimension (level based)
    <KeyExpression>
    <SQL dialect="generic">
    <![CDATA[TO_CHAR(payment, '999G999G990')]]>
    </SQL>
    </KeyExpression>

    This helped us to show that particular dimension in required thousand separated format. But it lead one more issue when same dimension come for join condition to retrieve any other dimension, it will create error for type casting , as it's making type as string which is not used for comparing with integer field. If we think in generic way we need some front end solution to get thousand separated numeric values for dimension.

  3. #3

    Default

    This work!
    Works for any database

    <KeyExpression>

    <SQL dialect="generic">
    <![CDATA[TO_CHAR(fielddate, 'dd-mm-yyyy')]]>
    </SQL>
    </KeyExpression>

    pt-br: Funciona para qualquer BD.

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.