Menu

Jasper Template Query - Setting Locale

ART Help
Gerd S
2022-08-30
2022-08-31
  • Gerd S

    Gerd S - 2022-08-30

    Hi,

    is there a chance to set the locale for a jasper report? I've tried creating parameters but doesn't work.
    I need it for different number-formats (. or ,) for different languages/countries. Best would be as parameter, but any solution is helpful.

    Or has someone else solved it in a different way? I need it only for a few reports, so it's ok if it's complicated to implement.

    Regards
    Gerd

     
  • Timothy Anyona

    Timothy Anyona - 2022-08-30

    Would the locale for the report match the language selected by the user for the art application?

     
  • Gerd S

    Gerd S - 2022-08-30

    Normally yes.
    But in this special case, it would be great if i can override it somehow (e.g. URL parameter), because this one is called by a script, and based on the parameters (like country or branch) we know which locale is needed (also background-image of jasper-report, ....)

    If only current locale is possible, i could also create more script-users with different locales as a workaround, if it's too complicated otherwise.

     
  • Timothy Anyona

    Timothy Anyona - 2022-08-31

    You can try the just released 6.7 version. In case of changing the locale per request, you can try and add the &lang parameter.

     
  • Gerd S

    Gerd S - 2022-08-31

    THANKS!!
    Now it uses the current language, but i can override it using the lang-parameter. So i can switch between different number-formats (,. <> .,) without changing the report.

    Thanks!

     

Log in to post a comment.