Add Report Explorer Content to a Report

Use the Report API's RptFile reporter to add Report Explorer content to a Report API report. For example, this script adds content generated by a Report Explorer setup file named recontent.rpt to a report generated by the Report API.

import mlreportgen.report.*
 
rpt = Report('myreport','docx');
add(rpt,TitlePage("Title","My Report"));

add(rpt, RptFile( "recontent.rpt"));

close(rpt);
rptview(rpt);

Note

To work with the Report API, a Report Explorer setup file must conform to certain restrictions. See mlreportgen.report.RptFile for more information.