rptview

Class: mlreportgen.report.Report
Package: mlreportgen.report

Open generated report file in viewer

Syntax

rptview(report)

Description

rptview(report) opens the generated report file in a viewer. The viewer used for displaying the report depends on the report type. For example, a report of type HTML opens in the default HTML browser.

Input Arguments

expand all

Report, specified as a report object. To create the report input, use mlreportgen.report.Report.

Tips

Calling rptview with an argument value other than an mlreportgen.report.Report object invokes the rptview function.

For example, in the following code, the first rptview call invokes the rptview method. The second rptview call invokes the rptview function.

import mlreportgen.report.*
rpt = Report('myReport','pdf');
add(rpt, 'Hello World');
close(rpt);
% Invokes rptview method
rptview(rpt);
% Invokes rptview function  
rptview('myReport.pdf');

Introduced in R2017b