It's all about the answers!

Ask a question

Time sheet Reports customization


Namit Pande (6111214) | asked May 20 '15, 5:09 p.m.
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



permanent link
Rafik Jaouani (4.9k16) | answered May 21 '15, 1:16 p.m.
JAZZ DEVELOPER
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

Comments
Namit Pande commented May 21 '15, 1:34 p.m.

 Thanks Rafik. I will reconfigure BIRT environment as per the documentation and will update you on how it goes.


Namit Pande commented May 22 '15, 11:44 a.m.

 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...


Namit Pande commented May 22 '15, 11:45 a.m.

 ...

and I have narrowed it to this code:
<method name="initialize"><![CDATA[hasData = false;
adjustedStartDate = null;
var s = params["From"].value;
if ((s != null) &amp;&amp; (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...


Namit Pande commented May 22 '15, 11:45 a.m.
...

 adjustedEndDate = null;

var e = params["To"].value;
if ((e != null) &amp;&amp; (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>

Your answer


Register or to post your answer.