Package: mlreportgen.report
Superclasses:
Chapter reporter
Create a chapter reporter that adds a chapter to the report. This class inherits from
mlreportgen.report.Section
.
creates a reporter that
generates a chapter. The chapter has a new page layout defined by the default template
of the reporter. ch
= Chapter()
The default template is a portrait page with a header and a footer. The header is
empty. If a chapter is the first chapter of the report, the footer contains an
automatically generated page number that starts with 1. If it is not the first chapter,
the page numbering continues from the last page of the previous chapter. Use the
Layout
property to override some of the page layout features of
the chapter, such as its orientation.
To add content to the chapter, use the mlreportgen.report.Chapter.add
method.
Before you add a chapter to a report, add all the content that you want into
that chapter. Once you add that chapter to a report
(add(report,chapter)
), you cannot add more content to
that chapter.
creates a report chapter containing a chapter title with the specified title text. ch
= Chapter(title
)
sets properties using name-value pairs. You can specify multiple name-value pair
arguments in any order. Enclose each property name in single quotes.ch
= Chapter(Name,Value
)
A chapter reporter is a type of section reporter and inherits its methods. See mlreportgen.report.Section
for descriptions of the methods.
add | Add section content |
createTemplate | Create section template |
customizeReporter | Create custom section reporter class |
getClassFolder | Section class definition file location |
getTitleReporter | Get section title reporter |
number | Set section numbering |
customizeReporter | Create class derived from Reporter class |
getImpl | Get implementation of reporter |
Handle. To learn how handle classes affect copy operations, see Copying Objects (MATLAB).
Add a chapter to the report. Set its layout orientation to landscape. Add a section to that chapter.
import mlreportgen.report.* import mlreportgen.dom.* rpt = Report('My Report','pdf'); add(rpt,TitlePage('Title','My Report')); chapter = Chapter('Images'); chapter.Layout.Landscape = true; add(chapter,Section('Title','Boeing 747', ... 'Content',Image(which('b747.jpg')))); add(rpt,chapter); close(rpt); rptview(rpt);
mlreportgen.report.Report
| mlreportgen.report.ReportLayout
| mlreportgen.report.Reporter
| mlreportgen.report.Section