We have created a Jasper report which shows Project Details. Also we took one project(Project A) for testing. The Project Start date was on 2nd Jan 2018.
To different users Res1 and Res2 with two different time zone (for eg: Res1 CST and Res2 EST) ran the same report for same project(Project A). Then the report shown different Start date for these two resources.
For Res1, report shown 1st Jan 2018 and for the Res2, the report shown the correct Start date ie; 2nd Jan 2018.
Can someone help me to fix this.
Did you mean that the two users are getting different results when they are running the same report from their individual accounts?
I had to undertake some research into this one a little while ago. All of our users are based in Western Australia, whilst the SaaS servers are located in NSW where there is a two hour time difference. To make it even more interesting, WA doesn't have day-light savings, so during summer the time difference is three hours.
We would periodically see JapserSoft report dates being 1 day out, potentially due to the 3 hour time difference in Summer.
What I did find, was that using Class Type of java.sql.Date did a worst job, java.sql.Timestamp did a better job
You'll notice that I also tried trunc'ing the date (and in my case I then had to add 1 day due to time zone challenges).
I ended up using
The last step I think was more for consistant date formatting in different regions, rather than timezone challenge.
Can't quarenttee the above will work for you as you have a larger timezone difference, but just showing what I did.
You may also consider in your SQL doing:
This may then restrict the date to the database, rather than the JasperSoft server trying to move dates for different timezone users.
Since this is a custom report then you could try to truncate the project start date (or CAST/CONVERT it to DATE format) when you retrieve it from the database. i.e. convert it from a date/time format ( the underlying PRPROJECT.PRSTART column is a date/time ) to just a date format.
Whether this is possible in Jaspersoft and whether it will then not apply the timezone adjustment (since its dealing with a date not a date/time) I don't know, I am just GUESSING that dealing with the field as a date might help the problem.
Yes. Two users are getting different results for the same report. That is because these two users are in different Time Zones.
This approach worked for me.
I tried convert to date format, but the issues didn't resolve. I am getting two different dates for same project in the custom report.
Ugh - OK my GUESS was wrong then, sorry about that.
Do you know if "stock" reports have the same issue as your custom report? If they don't then perhaps you could examine the stock report to see how it gets around the issue.
Then that is expected right. System is just respecting their individual time-zones and showing the dates accordingly. Correct me if I am wrong.
Yes. Based on the individual time zone the report is showing different dates for the same project. So I want to understand how the report will show two different start dates for same project for individual resource.
I believe it is referring to the Timezone setting for the individual accounts, as set in CA PPM:
May be you can update the Timezone of Res1 and make it same as Res2 and check if the project start date shows the same result after that. That will help you to get the confirmation.
Thanks Abhisek for your suggestion. I tried changing the resource time zone and it worked.
But we cannot change the time zone for all the users. So we need to solve the issue without changing the User time zone under account settings.
Glad to know that I was able to help you with your concern. But this is not an issue, this is working as expected. Report should respect the users' time-zones. If users working in US region see the dates as per IST there will be confusions. Hence I would not be suggesting to do that.