I18N for computed string columns.

birtnewbie
edited February 11, 2022 in Analytics #1
Hi All,
I have a problem that has been bothering me for quite some time now. I have a DB table that has a column containing numerical fields which would only be in the range of 1 to 8. In my JAVA program, I have defined strings for each of these values. for eg 1=Value1.. etc.. etc
and this mapping I have in a properties file, "StringMappings.properties"

Now my question is that does the BIRT ReportEngine or the DesignEngine API have the capability to substitute column values with something else based on a properties file given at runtime?? If not, then is there any other way to achieve the same thing?

Thanks in advance.

P.S sorry for the verbose question.. but I wanted to be as thorough as possible.. :)

Comments

  • Virgil Dodson
    Virgil Dodson E admin
    edited December 31, 1969 #2
    Hi birtnewbie,<br />
    <br />
    You can use the mapping feature for this. <br />
    <br />
    To use this, first select the whitespace in the report layout so the Property Editor shows the general properties for the report design, then select your properties file in the Resources tab.<br />
    <br />
    Then select your Data item and look at the MAP tab on the Property Editor view. Here you can set up a mapping between your values and the keys from the resource file...<br />
    <br />
    Since you mentioned you were doing this with the APIs, you might look at this post which is similar...<br />
    <a class='bbc_url' href='http://www.birt-exchange.com/modules/vbulletin/showthread.php?t=10254'>http://www.birt-exchange.com/modules/vbulletin/showthread.php?t=10254</a><br />
    <br />
    You might also look at using the Joint dataset. With this you can take your query and mix it with a text file (CSV, TSV, etc).
    Warning No formatter is installed for the format ipb
  • birtnewbie
    edited December 31, 1969 #3
    Thanks for the reply, that exactly solved my problem.

    This problem may be faced by many such "newbies" such as myself. I will post article on how to effeciently do this, so that nobody will ever have any problems with such I18N problems.

    It is so nice to see that BIRT has such user base that is rich in knowledge. :)