append
Class: mlreportgen.report.Report
Namespace: mlreportgen.report
Add content to report
Syntax
append(report,content)
Description
append( adds the
specified content to the report. If the status of the report is report,content)"unopened",
the append method sets the status to "open" and appends the
content. If the status of the report is set to "closed", the
append method returns an error message.
Note
You can add a reporter to a report multiple times, but you cannot add the reporter to
different reports. For example, if you add an mlreportgen.report.TitlePage
reporter to one report, you cannot add it to another report.
Input Arguments
Examples
Limitations
Once you append
contenttoreport, you cannot append additional content tocontent.
Tips
When you append instances of
mlreportgen.dom.Text,mlreportgen.dom.Number,mlreportgen.dom.InternalLink, ormlreportgen.dom.ExternalLinkobjects in reports, the object content appends differently depending on the report format. In HTML reports, the content appends in the same line. In PDF and DOCX reports, the content appends in separate lines. To append the content in the same line, create amlreportgen.dom.Paragraphobject, append the content to the paragraph object by using theappendmethod, then append the paragraph object to the report object.When you append an
mlreportgen.dom.Imageobject that uses a PDF as theimagePath, only the first page of the image appears.When you append an
mlreportgen.dom.Imageobject that uses a PDF as theimagePath, the image and report must use the same version of the PDF file format. For more information on determining the version of a PDF file, see Document properties and metadata overview on the Adobe website.
Version History
Introduced in R2020b