[
https://issues.apache.org/struts/browse/WW-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43828#action_43828
]
Christophe BONCHE commented on WW-2637:
---------------------------------------
Adding Timezone support:
- first adding timeZone property into JasperReportsResult
/**
* timezone or
*/
protected String timeZone;
in JasperReportsResult#execute() method add afer the line
parameters.put(JRParameter.REPORT_LOCALE,
invocation.getInvocationContext().getLocale());:
// put timezone in jasper report parameter
if(timeZone != null) {
timeZone = conditionalParse(timeZone, invocation);
final TimeZone tz = (TimeZone) TimeZone.getTimeZone(timeZone);
if(tz != null) {
// put the report time zone
parameters.put(JRParameter.REPORT_TIME_ZONE, tz);
}
}
and finally add the property setter method:
/**
* set time zone id
* @param timeZone
*/
public void setTimeZone(final String timeZone) {
this.timeZone = timeZone;
}
> add timezone support to Jasper Reports Plugin
> ---------------------------------------------
>
> Key: WW-2637
> URL: https://issues.apache.org/struts/browse/WW-2637
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - JasperReports
> Reporter: Christophe BONCHE
>
> It will be fine to define a timezone parameter. The timezone could be an ognl
> expression or the TimeZoneID string.
> This timezone has to be put into the map attribute:
> parameters.put(JRParameter.REPORT_TIME_ZONE, ...);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.