User`s guide
mlreportgen.dom.Container class
12-49
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 form CLASS:ID, where CLASS is the class of the element and ID is the value
of the Id property of the object. You can specify a tag to replace the generated tag.
Specify your own tag value, for example, to make it easier to identify where an issue
occurred during document generation.
Methods
Examples
Create Container for Word Report Formatting
Create a container object. Word output ignores the HTML container element tag (in this
example, the div tag).
import mlreportgen.dom.*;
rpt = Document('MyReport','docx');
c = Container();
Color all of the container text red.
c.Style = {Color('red')};
Append content to the container and append the container to the report.
append(c,Paragraph('Hello'));
append(c,Table(magic(5)));
append(rpt,c);
Close and generate the report.
close(rpt);
rptview(rpt.OutputPath);
• “Create Object Containers”
• “Add Content as a Group”