improving detail_reports.js