Run A Report: doReport (report_file)
Generate a report using the current view as data source (detailView or searchView) to fill in the JasperReports template report_file:
// generate a report for the current view — must be a view of MY_Schema
scope.doReport(‘reports/custom/MY_Schema/detailedReport.jasper’);