Update reporting.js

try to implement new function