Category: | Bug report |
Priority: | Normal |
Status: | Confirmed |
Project: | Severity: | Major |
Resolution: | Works as Designed |
|
Component: | Reproducibility: | N/A |
Assigned to: |
Hi,
I would like to set timezone selected by the user in UI to DateRangeBuilder or RelativeDateRange but it seems that every timezone is changed back to system default timezone
eg :
TimeZone timeZone = TimeZone.getTimeZone("Asia/Kolkata");
DateRangeBuilder dateRangeBuilder = new DateRangeBuilder("WEEK-1");
dateRangeBuilder.set(timeZone);
or
RelativeDateRange relativeDateRange = new RelativeDateRange("WEEK-1" ,timeZone,0 );
Please help and let me know how I could pass the a timezone different than system default timezone.
Thanks
v7.2
JasperReports
7 Comments:
There is a preference:
Preferences->Jaspersoft Studio->Report Execution->Calculate date range for input parameters using report time zone.
using this one you can instruct Jaspersoft Studio to take default system locale (nothing is set) or look into what locale you've setup for your report.
It's not very clear what other behavior you propose? Eventually explain it better, how and where user should setup this Timezone? You mean setup per Input Control?
I am not working with Jasper Studio, this is all in java code with the jasper imported classes.
"it seems that every timezone is changed back to system default timezone"
Could you post a concrete test case to reproduce the problem that you have?
Regards,
Lucian
I have already added the code that is enough. I want to use client timezone but it seems that is ignored and the system timezone is always considered.
You should pass the daterange builder to a jasper report as prompted parameter , when the prompted parameter is processed in code , client timezone is added, then you send this parameter to the jrxml report.