Javascript of reporting functionality implemented