links for 2011-06-29

30 06 2011




links for 2011-06-10

11 06 2011




links for 2011-06-08

9 06 2011




links for 2011-05-31

1 06 2011
  • package org.kodejava.example.util;

    import java.util.Currency;
    import java.util.Locale;

    public class CurrencySymbol {
    public static void main(String[] args) {
    Currency currency = Currency.getInstance(Locale.JAPAN);
    System.out.println("Currency.getSymbol() = " + currency.getSymbol());

    currency = Currency.getInstance(Locale.UK);
    System.out.println("Currency.getSymbol() = " + currency.getSymbol());

    currency = Currency.getInstance(Locale.US);
    System.out.println("Currency.getSymbol() = " + currency.getSymbol());

    currency = Currency.getInstance(new Locale("in", "ID"));
    System.out.println("Currency.getSymbol() = " + currency.getSymbol());
    }
    }

  • The locale is set during execution and is not stored in the JRXML file.

    If you run the report through iReport, it is possible to set the report locale in the Options window under the "Report execution options" section in the General tab. This will change how iReport runs your report.

    If you run the report embedded in Java, you set the REPORT_LOCALE parameter, like you mention. The following code is what I use:

    Locale locale = new Locale("en", "US");
    metadata.put(JRParameter.REPORT_LOCALE, locale);

    Where metadata is the parameter map sent to fillReport(…).








Seguir

Recibe cada nueva publicación en tu buzón de correo electrónico.