Documentation

mlreportgen.dom.RepeatAsHeaderRow class

Package:mlreportgen.dom

Repeat table row

Description

Specifies to repeat a table row on each new page when a table flows across multiple pages. This format applies only to Microsoft®Word documents.

Construction

repeatAsHeaderRowObj= RepeatAsHeaderRow()repeats table row on each new page when a table flows across multiple pages.

repeatAsHeaderRowObj= RepeatAsHeaderRow(onOff)repeats table row on each new page ifonOffistrue.

Input Arguments

expand all

onOff— Controls table row repeating on each new pagetrue(default)

Specify one of the following logical values:

  • trueor1— Table row repeats on each new page when a table flows across multiple pages.

  • falseor0— Table row does not repeat on each new page when a table flows across multiple pages.

Data Types:logical

Output Arguments

expand all

repeatAsHeaderRowObj— Repeat table rowmlreportgen.dom.RepeatAsHeaderRowobject

Repeat table row, represented by anmlreportgen.dom.RepeatAsHeaderRowobject.

Properties

expand all

IdID for document elementstring

A session-unique ID is generated as part of document element creation. You can specify an ID to replace the generated ID.

TagTag for document elementstring

Tag for document element, specified as a string.

A session-unique ID is generated as part of document element creation. The generated tag has the formCLASS:ID, whereCLASSis the class of the element andIDis the value of theIdproperty of the object. You can specify a tag to replace the generated tag.

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.

ValueRepeat table row on each new pagetrue(default)

Possible logical values are:

  • trueor1— Table row repeats on each new page when a table flows across multiple pages.

  • falseor0— Table row does not repeat on each new page when a table flows across multiple pages.

Data Types:logical

Examples

expand all

Repeat Table Row

Create a table with nor repeating row.

importmlreportgen.dom.*; doctype ='docx'; d = Document('repeatHeader',doctype); append(d,“表1”);表=表(的15, 2)); table.Style = {Border('solid'),RowSep('solid')}; append(d,table);

Create a second table with repeated row with a table row that cannot break across pages.

append(d,'Table 2');表=表(的15,2)); table.entry(1,1).Children(1).Content ='Header A'; table.entry(1,2).Children(1).Content ='Header B'; table.row(1).Style = {RepeatAsHeaderRow(true)}; table.Style = {Border('solid'),RowSep('solid')}; append(d, table); table.row(6).Style = {AllowBreakAcrossPages(false)}; table.entry(6,1).Children(1).Content =...'Start this row on new page if it does not fit on current page';fori=2:10 table.entry(6,1).append(Paragraph(Text(i)));endclose(d); rptview(d.OutputPath,doctype);

Generate the report.

close(d); rptview(d.OutputPath,doctype);

Related Examples

Was this topic helpful?