Time sheet Reports customization
Hello,
Has anyone made changes to the ootb timesheet reports provided in RTC? I am currently on ver 4.5 and need to make some changes to certain reports. I have been working with the Personal Timesheet by Project Area report and trying to modify it. I found the .rptdesign for the report along with the referenced shared library but I am running into error when I debug the report:
RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
Rhino runtime detected object 2015-01-01 of class java.sql.Date where it expected String, Number, Boolean or Scriptable instance. Please check your code for missing Context.javaToJS() call.>>>> Line changed to: 5
Anyone familiar with this error? Is there a report component that I am missing? Please help.
One answer
Hi Namit, make sure you setup your BIRT/RTC client following these instructions:
https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.reports.doc/topics/t_ccm_install_birt.html&scope=null
https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.reports.doc/topics/t_ccm_install_birt.html&scope=null
Comments
Thanks Rafik. I will reconfigure BIRT environment as per the documentation and will update you on how it goes.
Hi Rafik, I have setup the BIRT as per the instructions. I opened the same report and it still has the error.
Exact error is:
RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
Rhino runtime detected object 2015-01-01 of class java.sql.Date where it expected String, Number, Boolean or Scriptable instance. Please check your code for missing Context.javaToJS() call.
Cont...
...
and I have narrowed it to this code:
<method name="initialize"><![CDATA[hasData = false;
adjustedStartDate = null;
var s = params["From"].value;
if ((s != null) && (s.getTime() != 0)) {
var utc = s.getTime();
var offset = s.getTimezoneOffset()*60000;
var localTime = utc - offset;
adjustedStartDate = new Date(localTime);
reportContext.setGlobalVariable("adjustedStartDate", adjustedStartDate);
}
Cont...
...
adjustedEndDate = null;
var e = params["To"].value;
if ((e != null) && (e.getTime() != 0)) {
var utc = e.getTime();
var offset = e.getTimezoneOffset()*60000;
var localTime = utc - offset;
adjustedEndDate = new Date(localTime + 86400000); // add 24 hours to the end date
reportContext.setGlobalVariable("adjustedEndDate", adjustedEndDate);
}]]></method>