If we add $P{REPORT_TIME_ZONE} parameter then Timezone gets applied to all the dates in report.
Where I have used my customized class which has REPORT_TIME_ZONE as parameter so I am expecting this timeZone should only be applied to column/field where I want date to be seen as per timeZone and not to all dates in my report.
Is it possible or is this a bug ?
I've below expression in my jrxml and I've used this only for specific dates and not for all dates.
Jasper_custom_formatter is a java class which has this getDateInPropertyTimeZone method which does conversion.
But instead of applying passed parameter timezone on generation_date it's applying on all dates in report.
Work around is to pass timezone as string in some other parameter other than $P{REPORT_TIME_ZONE} and create timezone in getDateInPropertyTimeZone method but this is big change as I'll have to change all my jrxmls and pass additional parameter to jrxml and to pass it to inner datasets etc. So it's big change.
$P{Jasper_custom_formatter}.getDateInPropertyTimeZone($F{generation_date}, $P{REPORT_TIME_ZONE}, $P{userDateFormat}+ " HH:mm:ss", $P{REPORT_LOCALE})
Recommended Comments