Package: mlreportgen.report
Superclasses:
Layout for reporter
Page layout options (watermark, first page number, and page number format) for the report.
Note
Reports create instances of this object that are assigned to the Reporter Layout properties. You do not need to create this object yourself.
Add three chapters reporters to a report. The first chapter uses default values for first page number and page orientation. The second chapter resets the first page number to 1 and uses landscape page orientation. Neither first page number nor page orientation is set in the third chapter. It uses the default first page number, which continues from the previous chapter, and default page orientation.
import mlreportgen.report.* rpt = Report('newreport'); tp = TitlePage(); tp.Title = 'New Report'; tp.Author = 'MathWorks'; add(rpt,tp) ch1 = Chapter(); ch1.Title = 'First Chapter'; sec = Section('First Section of Chapter 1'); txt = ['This is the first section of chapter 1. ',... 'The first page number for this ',... 'chapter is 1, which is the default. ',... 'The page orientation is also the default.']; add(sec,txt) add(ch1,sec) add(rpt,ch1) ch2 = Chapter(); ch2.Title = '2nd chapter'; ch2.Layout.FirstPageNumber = 1; ch2.Layout.Landscape = true; sec = Section('First Section of Chapter 2'); txt = ['This is the first section of chapter 2. ',... 'The first page number is set to 1 and the ',... 'page orientation is set to landscape.']; add(sec,txt) add(ch2,sec) add(rpt,ch2) ch3 = Chapter(); ch3.Title = '3rd chapter'; sec = Section('First Section of Chapter 3'); txt = ['This is the first section of chapter 3. ',... 'Neither first page number nor page ',... 'orientation is set for this chapter. ',... 'The first page number uses the default, ',... 'which continues from the previous page. ',... 'The page orientation also uses the default, ',... 'which is portrait.']; add(sec,txt) add(ch3,sec) add(rpt,ch3) rptview(rpt)
mlreportgen.dom.PageNumber
| mlreportgen.report.Report
| mlreportgen.report.Reporter
| mlreportgen.report.ReportLayout