Time zone localization in Jasper Server - solution

0

This is not a question but an answer to one which a number of people have asked: namely how to localise reports in Jasper Server with respect to time zone

I have written a wiki page about it. I can't seem to link directly to it here, but if you go to the wiki, click How-To in the common searches and then search for time zone localization you should find it

 

Hope it is useful

toddbrook's picture
257
Joined: Oct 1 2010 - 6:16am
Last seen: 2 years 5 months ago

2 Answers:

0
djohnson53's picture
79006
Joined: May 25 2012 - 11:10am
Last seen: 2 hours 56 min ago
0

Just a small note that can help other people reading the article posted above. Under the section 3. Setting the user’s time zone it is written following by the author:

"The value provided here gets set as the REPORT_TIME_ZONE parameter. 

It might be possible to set the user’s time zone when logging in via some SSO mechanism but I have not investigated this."

If you are making the build yourself from the source code, you can override it from file jasperreports.properties located under: jasperserver\jasperserver-war\src\main\webappAdditions\WEB-INF\classes.

Just uncomment last line property net.sf.jasperreports.jdbc.time.zone and set your time zone instead of REPORT_TIME_ZONE value (use quotes to ensure unescaping): 

# use the report/user time zone to fetch values from databases
#net.sf.jasperreports.jdbc.time.zone=REPORT_TIME_ZONE
 
Example:
net.sf.jasperreports.jdbc.time.zone='Europe/Belgrade'
darkolakovic's picture
Joined: Dec 3 2015 - 7:50am
Last seen: 3 years 1 month ago
Feedback