Clarity

Expand all | Collapse all

Different Project Start date for different Users in Advance reporting

Harikumar S

Harikumar SAug 29, 2018 06:08 AM

  • 1.  Different Project Start date for different Users in Advance reporting

    Posted Aug 27, 2018 10:55 AM

    Hi All,

     

    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.

     

    Thanks

    Hari



  • 2.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 27, 2018 11:07 AM

    Hi Hari, 

     

    Did you mean that the two users are getting different results when they are running the same report from their individual accounts? 

     

    Thanks,

    Abhisek Dhar



  • 3.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 27, 2018 11:29 AM

    Yes. Two users are getting different results for the same report. That is because these two users are in different Time Zones.

     

    Thanks

    Hari



  • 4.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 27, 2018 11:35 AM

    Then that is expected right. System is just respecting their individual time-zones and showing the dates accordingly. Correct me if I am wrong. 



  • 5.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 28, 2018 05:11 AM

    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.

     

    Thanks

    Hari



  • 6.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 28, 2018 05:34 AM

    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. 



  • 7.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 28, 2018 06:07 AM

    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.

     

    Thanks

    Hari 



  • 8.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 28, 2018 06:29 AM

    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. 



  • 9.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 28, 2018 06:49 AM

    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.



  • 10.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 28, 2018 09:48 AM

    Thanks Dave.

     

    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.

     

    Thanks

    Hari



  • 11.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 28, 2018 10:01 AM

    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.



  • 12.  Re: Different Project Start date for different Users in Advance reporting
    Best Answer

    Posted Aug 28, 2018 11:52 PM

    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

    • In the select statement, don't format the date, just select it (aka inv.schedule_finish)
    • Define it as class type java.sql.Timestamp
    • For the TextField I then used DateFormat.getDateInstance(DateFormat.SHORT, $P{REPORT_LOCALE}).format($F{SCHEDULE_FINISH})

     

    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:

    • to_char(inv.schedule_finish, 'YYYY-MM-DD') schedule_finish_format  --- use what ever output format, the one used is Australian
    • Define it as class type java.sql.String

    This may then restrict the date to the database, rather than the JasperSoft server trying to move dates for different timezone users. 



  • 13.  Re: Different Project Start date for different Users in Advance reporting

    Posted Aug 29, 2018 06:08 AM

    Thanks Roland

     

    This approach worked for me.