MATLAB® Report Generator™User's GuideR2015a
x ContentsHeader and Footers in Word Conversion Templates . . . . . . 6-10Copy a Conversion Template . . . . . . . . . . . . . . . . . . . . . . . . .
4 Generate a Report4-10Report Generation ProcessingThe Report Options dialog box includes several options for controlling report processing.Option Pur
Select Report Generation Options4-11Option Purposecontents. If a report requires multiple compilations, theprocessing can be quite time-consuming.To
4 Generate a Report4-12Report File NameIn the Report Explorer, in the Report Options dialog box, use the Filename field tospecify a file name for the
Report Generation Preferences4-13Report Generation PreferencesIn this section...“Report Generator Preferences Pane” on page 4-13“File Format and Exte
4 Generate a Report4-14File Format and ExtensionTo specify the default file format for reports, use the Format ID preference. The defaultpreference is
Report Generation Preferences4-15The Extension preference reflects the standard file extension for the file formatspecified with the Format ID prefer
4 Generate a Report4-16Preference PurposeVisible in ReportExplorerDeselect this check box to make the current outputformat unavailable in the Report E
Change Report Locale4-17Change Report LocaleVersions 2.0 and later of the MATLAB Report Generator and Simulink Report Generatorsoftware use the local
4 Generate a Report4-18Convert XML Documents to Different File FormatsIn this section...“Why Convert XML Documents?” on page 4-18“Convert XML Document
Convert XML Documents to Different File Formats4-192Select your XML source file using one of the following options:• Click Browse in the Properties p
xiCreate Custom Components7About Custom Components . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2Create Custom Components . . . . . . . . .
4 Generate a Report4-20For more information about customizing stylesheets, see “Create a NewStylesheet”.4Use the View Report when done converting chec
Create a Report Log File4-21Create a Report Log FileA log file describes the report setup file report-generation settings and components. A logfile c
4 Generate a Report4-22Generate MATLAB Code from Report Setup FileYou can generate MATLAB code versions of report setup files in the form of a MATLABf
Generate MATLAB Code from Report Setup File4-235To generate the figloop_tutorial report from this MATLAB file, run thefollowing command in the MATLAB
4 Generate a Report4-24
Troubleshooting Report Generation Issues4-25Troubleshooting Report Generation IssuesIn this section...“Memory Usage” on page 4-25“HTML Report Display
5Add Content with Components• “Components” on page 5-2• “Report Structure Components” on page 5-4• “Table Formatting Components” on page 5-5• “Propert
5 Add Content with Components5-2ComponentsComponents are MATLAB objects that specify the content of a report. Add componentsto specify the types of co
Components5-3Component FormattingWhen you generate a report, in the Report Options dialog box, in the File format fieldyou specify the type of report
xii ContentsEdit, Save, or Delete a Stylesheet . . . . . . . . . . . . . . . . . . . . . . 8-5Edit a Stylesheet . . . . . . . . . . . . . . . . . . .
5 Add Content with Components5-4Report Structure ComponentsUse report structure components to organize the content of your report into chapters,sectio
Table Formatting Components5-5Table Formatting ComponentsUse table formatting components to organize generated content into tables. The followingtabl
5 Add Content with Components5-6Property Table ComponentsIn this section...“About Property Table Components” on page 5-6“Open the Example Report Templ
Property Table Components5-7Many types of property table components are available, including:• MATLAB Property Table• Simulink Property Table (requir
5 Add Content with Components5-8Open the Example Report TemplateThis example uses the figloop-tutorial report template. To open the figure looptutoria
Property Table Components5-9Select Object TypesProperty table components offer multiple object types on which to report. For example,the Handle Graph
5 Add Content with Components5-10split mode. Split mode supports only one property name/property value pair per cell.If more than one property pair ap
Property Table Components5-11Format OptionsTo specify alignment for text in a given cell, in the toolbar at the bottom of the dialog boxuse the four
5 Add Content with Components5-12Edit Table TitlesTable titles can contain properties and text. By default, the title of a table is the same asthe val
Property Table Components5-13If you type text outside the angle brackets, the text appears as is in the report. Textinside the table brackets must sp
xiiiHow to Compare XML Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4Select Files to Compare . . . . . . . . . . . . . . . . . . . .
5 Add Content with Components5-14bIn the Properties Type drop-down list at the upper-right of the dialog box, selecta property type.cIn the Properties
Property Table Components5-15Button ActionDelete selected columnAdd row (added above the selected row)Delete selected rowResize ColumnsTo resize the
5 Add Content with Components5-16Zoom and ScrollYou can zoom in and out of the table with the zoom buttons, which are located to the leftof the horizo
Summary Table Components5-17Summary Table ComponentsIn this section...“About Summary Table Components” on page 5-17“Open the Example Report Template”
5 Add Content with Components5-18Many types of summary table components are available, including:• Handle Graphics Summary Table• Simulink Summary Tab
Summary Table Components5-19setedit figloop-tutorialSelect Object TypesYou can use the Object type selection list to choose Handle Graphics object ty
5 Add Content with Components5-20To remove a property from the table:1Select the property in the Property columns table.2Click the Delete property b
Logical and Looping Components5-21Logical and Looping ComponentsLogical and looping components execute conditionally, determining when a childcompone
5 Add Content with Components5-22Edit Figure Loop ComponentsIn this section...“Figure Loop in a Report” on page 5-22“Figure Properties” on page 5-23“L
Edit Figure Loop Components5-23Figure PropertiesFigure properties control which figures appear in the report. Table 1.1 of the figloop-tutorial repor
xiv ContentsDocument Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4DOM Object Help and Documentation . . . . . . . . . .
5 Add Content with Components5-24For this example, do not change these properties. For more information, see “Add,Replace, and Delete Properties in Ta
Edit Figure Loop Components5-25in each loop appear in the report by using the options in the Figure Loop component'sSection Options pane.• Creat
6Template-Based Report Formatting• “Report Conversion Templates” on page 6-2• “Generate a Report Using a Template” on page 6-4• “Conversion Template C
6 Template-Based Report Formatting6-2Report Conversion TemplatesIn this section...“Templates for Report Conversion” on page 6-2“Custom Templates” on p
Report Conversion Templates6-3• Does not use Java memory to convert report XML content to HTML, Word, or PDF.Converting report XML content without us
6 Template-Based Report Formatting6-4Generate a Report Using a Template1In Report Explorer, in the Outline pane, select the report.2In the Report Opti
Conversion Template Contents6-5Conversion Template ContentsIn this section...“Default Styles” on page 6-5“Part Templates” on page 6-9“Header and Foot
6 Template-Based Report Formatting6-6Style Report Explorer Components the Style FormatsrgBody Text componentrgChapter Chapter componentrgChapterTitle
Conversion Template Contents6-7Style Report Explorer Components the Style FormatsrgProgramListing Code generated by:• Text component with Show text a
xvUse Subforms in a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-31Create Document Part Template Libraries . . . . . . . . . . . .
6 Template-Based Report Formatting6-8Style Report Explorer Components the Style FormatsrgSect3TitleText Text for Section title for third-levelsection
Conversion Template Contents6-9Part TemplatesThe conversion templates include template parts to format specific elements of a report.Part Template Re
6 Template-Based Report Formatting6-10Part Template Report Explorer Components the Part TemplateFormatsTable title, including prefix (such as Table,nu
Conversion Template Contents6-11Related Examples• “Generate a Report Using a Template” on page 6-4• “Copy a Conversion Template” on page 6-12• “Custo
6 Template-Based Report Formatting6-12Copy a Conversion TemplateCopy a Conversion Template1In Report Explorer, select Tools > Edit Document Convers
Copy a Conversion Template6-13More About• “Report Conversion Templates” on page 6-2
6 Template-Based Report Formatting6-14Open a Conversion Template1In Report Explorer, select Tools > Edit Document Conversion Template. TheTemplate
Set Conversion Template Properties6-15Set Conversion Template PropertiesFor custom conversion templates, you can specify properties to describe the t
6 Template-Based Report Formatting6-16Move a Conversion TemplateYou can change the location of a template file.1In Report Explorer, select Tools >
Delete a Conversion Template6-17Delete a Conversion Template1In Report Explorer, select Tools > Edit Document Conversion Template. TheTemplate Bro
xvi ContentsCreate a Link Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-73Create an External Link . . . . . . . . . . . . . . . .
6 Template-Based Report Formatting6-18Customize Microsoft Word Report StylesIn this section...“Customize Default Microsoft Word Component Styles” on p
Customize Microsoft Word Report Styles6-191In the Report Explorer, select Tools > Edit Document Conversion Template.2In the list of templates in t
6 Template-Based Report Formatting6-20• “Conversion Template Contents” on page 6-5
Customize Microsoft Word Part Templates6-21Customize Microsoft Word Part TemplatesIn this section...“Custom Word Part Templates” on page 6-21“Display
6 Template-Based Report Formatting6-22Display the Developer Ribbon in WordTo work with holes in a Word template, use the Word Developer ribbon. If the
Customize Microsoft Word Part Templates6-2310In the Create New Building Block dialog box, set Name to the part template name(for example, rgChapter)
6 Template-Based Report Formatting6-2410Select the part template and click the Quick Parts button.11Click Save Selection to Quick Part Gallery.12In th
Customize Microsoft Word Part Templates6-25Distinguish Inline and Block HolesThe Report Explorer supports two types of holes: inline and block.• Use
6 Template-Based Report Formatting6-26Avoid Changing Block Holes to Inline HolesDo not change a block hole to an inline hole.You can accidentally chan
Customize Microsoft Word Part Templates6-27Tip To display Word markup for the part template, on the Word ribbon, in theDeveloper tab, click Design Mo
xviiSupport for HTML Character Entities . . . . . . . . . . . . . . . 13-104Display Report Generation Messages . . . . . . . . . . . . . . . . 13-106R
6 Template-Based Report Formatting6-28Add an Inline HoleThe only kind of holes that you can add to a part template are the holes that theReport Explor
Customize Microsoft Word Part Templates6-2913In the template, select all of the contents of the part template and click the Deletebutton.14Save and c
6 Template-Based Report Formatting6-30Customize a Microsoft Word Title Page TemplateIn this section...“Create a Custom Template” on page 6-30“Change t
Customize a Microsoft Word Title Page Template6-317Apply the properties by selecting another template in the list of templates.Change the Color of a
6 Template-Based Report Formatting6-325In the Modify Style dialog box for rgTitle, click the down arrow for Automatic.Select the blue color box and cl
Customize a Microsoft Word Title Page Template6-336In the Manage Styles dialog box, click OK.7Save and close the template.Assign the Template to a Re
6 Template-Based Report Formatting6-343In the Report Options pane, click Open report.4In the magic_squares report, add a Title Page component. In the
Customize a Microsoft Word Title Page Template6-354In the Quick Parts gallery, select rgRectoTitlePage to insert of the front title pagepart template
6 Template-Based Report Formatting6-36Create a Custom HTML TemplateIn this section...“Copy an HTML Template” on page 6-36“Select an HTML Editor” on pa
Create a Custom HTML Template6-37Select an HTML EditorBy default, when you edit an HTML style sheet, the style sheet appears in the MATLABEditor.To u
6 Template-Based Report Formatting6-38More About• “Report Conversion Templates”
7Create Custom Components• “About Custom Components” on page 7-2• “Create Custom Components” on page 7-3• “Define Components” on page 7-6• “Specify Ta
7 Create Custom Components7-2About Custom ComponentsIn most cases, the components provided with the MATLAB Report Generator softwareshould be more tha
Create Custom Components7-3Create Custom ComponentsTo create a component:1Open the Report Explorer.2Select one of the component creation choices from
7 Create Custom Components7-43Specify properties of the component in the Properties pane of the Report Explorer.For more information, see “Define Comp
Create Custom Components7-5Note: You must restart the MATLAB software session before using a newly created orrebuilt component.
7 Create Custom Components7-6Define ComponentsIn this section...“Required Component Data” on page 7-6“Specify the Location of Component Files” on page
Define Components7-71Class Directory Field. Specify a class name for your component. The build processcreates a folder with the name you specify and
7 Create Custom Components7-83Category Name. Specify the category of components to which the new componentbelongs. The component appears under this ca
Define Components7-9Specify Component PropertiesComponent properties determine how a component behaves and what information itinserts into a report.
1Getting Started• “MATLAB Report Generator Product Description” on page 1-2• “MATLAB Code and Results Presentation” on page 1-3• “Report Creation Work
7 Create Custom Components7-102Right-click the name of a predefined property in the Options pane in the middle.From the context menu, select Add prope
Define Components7-11Specify Component Properties1Property Name. Create a name for the new property. A property name must be avalid MATLAB variable n
7 Create Custom Components7-12component and stores them in the specified folder. For more information about specifyingwhere components are stored, see
Specify Tasks for a Component to Perform7-13Specify Tasks for a Component to PerformIn this section...“About Component Customization” on page 7-13“Re
7 Create Custom Components7-14The execute command has the following syntax:out = execute(thisComp, parentDoc)Where:• thisComp is a handle to the compo
Specify Tasks for a Component to Perform7-15For more information, enter help(rptgen.cfr_list) at the MATLAB command line.Create TextTo create text, r
7 Create Custom Components7-16olstring = getOutlineString(thisComp) Where:• thisComp is the component whose description you are specifying.• olstring
Specify Tasks for a Component to Perform7-17Note: Do not modify fields that are not explicitly included in this file. These fields aresubject to chan
7 Create Custom Components7-18compDesc = 'An example component';Change a Component Display NameThe display name in getName.m is the same val
Customized Components7-19Customized ComponentsIn this section...“Fetching Securities Data and Displaying It in a Table” on page 7-19“Displaying Secur
How to Contact MathWorksLatest news:www.mathworks.comSales and services:www.mathworks.com/sales_and_servicesUser community:www.mathworks.com/matlabcen
1 Getting Started1-2MATLAB Report Generator Product DescriptionDesign and generate reports from MATLAB applicationsMATLAB Report Generator lets you cr
7 Create Custom Components7-203To build the new component, click the Build button in the Report Explorer. TheEquity Values component now appears in th
Customized Components7-21 stockQuote = fetch(GOOG, thisComp.Ticker);stockQuote.Date = datestr(stockQuote.Date,1);stockQuote.Time = datestr(stockQuote
7 Create Custom Components7-226Modify the getdialogschema.m file to change the appearance of the Propertiespane. Enter the following text into this fi
Customized Components7-23 thisComp.dlgWidget('Ticker',... 'DialogRefresh',true,... 'RowSpan',[1 1],&
7 Create Custom Components7-24Displaying Securities Data in Two TablesThis example, which shows how to use multiple properties within a component, exp
Customized Components7-25
8Create Custom Stylesheets• “Stylesheets” on page 8-2• “Create a New Stylesheet” on page 8-4• “Edit, Save, or Delete a Stylesheet” on page 8-5• “Edit
8 Create Custom Stylesheets8-2StylesheetsIn this section...“Built-In Versus Custom Stylesheets” on page 8-2“Customize Stylesheets Using Data Items” on
Stylesheets8-3Name DescriptionNote: This field is not editable.In most cases, the stylesheets provided with the MATLAB Report Generator softwareshoul
MATLAB Code and Results Presentation1-3MATLAB Code and Results PresentationYou can use the MATLAB Report Generator to create reports for sharing your
8 Create Custom Stylesheets8-4Create a New StylesheetTo create a stylesheet:1Open the Report Explorer.2From the menu bar, click Tools > Edit Styles
Edit, Save, or Delete a Stylesheet8-5Edit, Save, or Delete a StylesheetIn this section...“Edit a Stylesheet” on page 8-5“Save a Stylesheet” on page 8
8 Create Custom Stylesheets8-6You can use the Report Explorer to work with stylesheets as follows.Task Pane to Use ActionCreate a stylesheet Propertie
Edit, Save, or Delete a Stylesheet8-7Task Pane to Use ActionOpen an existing stylesheet Properties Click the name of the stylesheet,which appear in t
8 Create Custom Stylesheets8-82Select File > Save As from the menu bar and specify a new name for the stylesheet(to avoid overwriting built-in styl
Edit Stylesheet Data Items8-9Edit Stylesheet Data ItemsIn this section...“Data Item Categories in Built-In Stylesheets” on page 8-9“Edit Data Items i
8 Create Custom Stylesheets8-10Category Description of Data Items in CategoryPagination and GeneralStylesSpecifications of page orientation, margins,
Edit Stylesheet Data Items8-11Category of Style Description of Data Items in CategoryChunking Options related to using an explicit TOC for chunking,d
8 Create Custom Stylesheets8-12• DocBook print parameters, see http://docbook.sourceforge.net/release/dsssl/current/doc/print/Categories of Styles in
Edit Stylesheet Data Items8-13Category of Style Description of Data Items in CategoryTables Specification of width in simple listVariableLists Option
1 Getting Started1-4Report Creation WorkflowApproaches for Creating ReportsYou can create and generate reports :• Interactively, using the Report Expl
8 Create Custom Stylesheets8-14stylesheet. The Options pane in the middle shows a list of available stylesheet dataitems. The Properties pane on the r
Edit Stylesheet Data Items8-15Edit Boolean and Enumerated ValuesIn the previous figure, theShow Comments data item is of type Boolean. Its currentval
8 Create Custom Stylesheets8-16Edit StringsFor the values of some data items, the Report Explorer displays text in the editableValue field. You can sp
Edit Stylesheet Data Items8-17To adjust the grid used to position the title page elements (such as the title and author)on the page, in the Propertie
8 Create Custom Stylesheets8-181In the Properties pane, in the Include on title page list, select an element toexclude.2Click the right arrow button.
Edit Stylesheet Data Items8-19Modify Title Placement PropertiesThe Title Placement data items, which are in the Miscellaneous category, control thepo
8 Create Custom Stylesheets8-20Modify AttributesAn attribute is a data item that specifies information for an XML element. An attributemust be a child
Edit Stylesheet Data Items8-21Edit Varpair ValuesData items in RTF stylesheets appear as varpair data items, which are name/valuepairs of information
8 Create Custom Stylesheets8-22on the right looks different from code associated with other kinds of MATLAB ReportGenerator stylesheets.Delete Data It
Stylesheet Cells for Headers and Footers8-23Stylesheet Cells for Headers and FootersIn this section...“About Stylesheet Cells and Cell Groups” on pag
Report Creation Workflow1-5OpenReportExplorer(GUI)Report GeneratorCreatesetupfileApplystylesheetGeneratereportAddcomponentsGenerateM-codeTo practice
8 Create Custom Stylesheets8-24You can use many combinations of conditions and values to customize content of headersand footers. The MATLAB Report Ge
Stylesheet Cells for Headers and Footers8-25Label Definition DescriptionCondition Condition that mustbe met for content toappear in the reportThis is
8 Create Custom Stylesheets8-26Possible conditions and their values as coded in XML are shown in the following table.Name of ConditionPossible Values
Stylesheet Cells for Headers and Footers8-27documents. For details about XSLT, see the Web site for the World Wide WebConsortium (W3C®) at http://ww
8 Create Custom Stylesheets8-28Each of these attribute sets is a pagination style data item for PDF stylesheets. You canedit a particular attribute in
Customized Stylesheets8-29Customized StylesheetsIn this section...“Number Pages in a Report” on page 8-29“Add Graphics to Headers in PDF Reports” on
8 Create Custom Stylesheets8-303Click Append.Add Graphics to Headers in PDF ReportsThis example shows how to include an image in the center of the hea
Customized Stylesheets8-31Note: PDF reports only support bitmap (.bmp), jpeg (.jpg), and Scalable VectorGraphics (.svg) images.To include this image
8 Create Custom Stylesheets8-32dDelete the text in the Value (XML) field.eSelect Graphic from the Append template selection list and click Append.The
Customized Stylesheets8-334By default, the name of the graphic is logo.bmp. Change all instances of this nameto sample_logo.bmp in the Value (XML) fi
1 Getting Started1-6How MATLAB Report Generator and MATLAB Software InteractThe MATLAB Report Generator and MATLAB software interact to create reports
8 Create Custom Stylesheets8-34bBy default the value for the height of the header is 0.4 inch. Replace this valuewith 1.0in.cSave the stylesheet.7Gene
Customized Stylesheets8-35Change Font Size, Page Orientation, and Paper Type of a GeneratedReportThis example shows how to:• Generate an XML source f
8 Create Custom Stylesheets8-36The MATLAB Report Generator software converts the XML source file forwsvar-report to PDF format, and then opens the PDF
Customized Stylesheets8-37The customheader.rgs stylesheet appears as an available stylesheet in theOptions pane in the middle of the Report Explorer.
8 Create Custom Stylesheets8-384In the Attributes area of the Properties pane on the right, click Font Size - <xml>.The Report Explorer looks as
Customized Stylesheets8-39The font size value is a product of $body.font.master and 2.0736. To change thefont size to a larger size, change the multi
8 Create Custom Stylesheets8-40PDF Fonts for Non-English PlatformsIn this section...“PDF Font Support for Languages” on page 8-40“Identifying When to
PDF Fonts for Non-English Platforms8-41Stylesheets Override PDF Font MappingPDF stylesheets for the MATLAB Report Generator specify fonts for body te
8 Create Custom Stylesheets8-42• name_map — Contains name_mapping elements that specify the name of the font, thelanguage, and the font usage in the r
PDF Fonts for Non-English Platforms8-43 <name_mapping lang="ru" platform="win" usage="body">Arial Unicode MS&l
Report Components1-7Report ComponentsTypes of Report ComponentsComponents are MATLAB objects that specify the content of a report. The MATLABReport G
8 Create Custom Stylesheets8-44The approach you use to identify font names depends on your computer platform.Font names on WindowsTo identify a TrueTy
PDF Fonts for Non-English Platforms8-45Each name_mapping element has three attributes:• lang specifies the two letter ISO 639-1 code corresponding to
8 Create Custom Stylesheets8-46• ~/Library/Fonts• /Library/Fonts• Network/Library/Fonts• System/Library/Fonts• System/Folder/FontsLinux Font File Loca
9Comparing XML Files• “Compare XML Files” on page 9-2• “How to Compare XML Files” on page 9-4• “Explore the XML Comparison Report” on page 9-6• “How t
9 Comparing XML Files9-2Compare XML FilesYou can use MATLAB Report Generator software to compare a pair of XML text files.The XML comparison tool proc
Compare XML Files9-31“How to Compare XML Files” on page 9-42“Explore the XML Comparison Report” on page 9-6
9 Comparing XML Files9-4How to Compare XML FilesIn this section...“Select Files to Compare” on page 9-4“Change Comparison Type” on page 9-5“XML Compar
How to Compare XML Files9-5From the Comparison ToolTo compare files using the Comparison Tool, from the MATLAB Toolstrip, in the Filesection, select
9 Comparing XML Files9-6Explore the XML Comparison ReportIn this section...“Navigate the XML Comparison Report” on page 9-6“Save Comparison Log Files
Explore the XML Comparison Report9-7Type of reportitemHighlighting NotesContainer None Rows with no highlighting indicate a container item thatcontai
1 Getting Started1-8Report ExplorerAbout the Report ExplorerUse the Report Explorer to:• Create and modify report setup files.• Apply stylesheets to f
9 Comparing XML Files9-8Save Comparison Log Files in a Zip FileTemporary XML comparison files accumulate in tempdir/MatlabComparisons/XMLComparisons/T
Explore the XML Comparison Report9-9Property of xmlcomp.Edits DescriptionLeftFileName File name of left file exported to XML.LeftRoot xmlcomp.Node ob
9 Comparing XML Files9-10How the Matching Algorithm WorksIn this section...“Why Do I See Unexpected Results?” on page 9-10“How the Chawathe Algorithm
How the Matching Algorithm Works9-11The Chawathe algorithm matches a particular label by extracting a flat sequence ofelements from the hierarchical
9 Comparing XML Files9-12Why Use a Heuristic Algorithm?Chawathe’s algorithm is a heuristic. That is, it cannot guarantee to return the optimalmatching
How the Matching Algorithm Works9-13• A elements are scored on the ratio of matching B elements• For both A and B the score is compared with a thresh
9 Comparing XML Files9-14In this case, the user might expect to see the very first C element on the left marked asdeleted, with the second and third C
How the Matching Algorithm Works9-15Two Sequences of Elements Are Cross-MatchedIt is difficult to distinguish many similar potential matches and this
10Components — Alphabetical List
Report Explorer1-9Library paneThe Report Explorer has three panes:• The Outline pane on the left shows the hierarchy of components in currently opene
10 Components — Alphabetical List10-2Array-Based TableConvert rectangular array into table and insert it into reportDescriptionThis component converts
Array-Based Table10-3is truncated so that the number of elements equals the number of columns. If m isless than the number of columns in the table, t
10 Components — Alphabetical List10-4Insert Anything into Report?Yes. Table.Classrptgen.cfr_tableSee AlsoTable, Table Body, Table Column Specification
Axes Loop10-5Axes LoopRun child components for all axes objects in MATLAB workspaceDescriptionThe Axes Loop component runs its child components for a
10 Components — Alphabetical List10-6Insert Anything into Report?Yes, inserts a section if you select the Create section for each object in loop optio
Axes Snapshot10-7Axes SnapshotInsert image of selected MATLAB axes objects into the generated reportDescriptionInserts an image of selected MATLAB ax
10 Components — Alphabetical List10-8• JPEG medium quality image• JPEG low quality image• PNG 24-bit image• TIFF - compressed• TIFF - uncompressed• Wi
Axes Snapshot10-9• Custom: Specifies a custom image size. Specify the image size in the Size field andUnits list.• Size: Specifies the size of the fi
10 Components — Alphabetical List10-10• Max size: Specifies the maximum size of the snapshot in the format w h (width,height). This field is active on
Chapter/Subsection10-11Chapter/SubsectionGroup portions of report into sections with titlesDescriptionThis component groups portions of the report in
1 Getting Started1-10Outline Pane Context Library Pane ContentsNo report setup file is open. ReportsReport setup file is open. ComponentsStylesheet is
10 Components — Alphabetical List10-12• Word (from template)• HTML (from template)• PDF (from template)2In the Chapter/Section properties dialog box,
Comment10-13CommentInsert comment into XML source file created by report generation processDescriptionThis component inserts a comment into the XML s
10 Components — Alphabetical List10-14Classrptgen.crg_commentSee Also“Convert XML Documents to Different File Formats”, Import File, Nest SetupFile, S
Empty Component10-15Empty ComponentGroup components to move, activate, or deactivate them, or create blank space in listDescriptionThis component doe
10 Components — Alphabetical List10-16Evaluate MATLAB ExpressionEvaluate specified MATLAB expressionDescriptionThis component evaluates a specified MA
Evaluate MATLAB Expression10-17To stop report generation when an error occurs in the MATLAB code that you added,change the second and third lines of
10 Components — Alphabetical List10-18Figure LoopApply child components to specified graphics figuresDescriptionThis component applies each child comp
Figure Loop10-19• Create link anchor for each object in loop: Creates a hyperlink to the object inthe generated report.Insert Anything into Report?Ye
10 Components — Alphabetical List10-20Figure SnapshotInsert snapshot of Handle Graphics figure into reportDescriptionThis component inserts a snapshot
Figure Snapshot10-21• JPEG medium quality image• JPEG low quality image• PNG 24-bit image• TIFF - compressed• TIFF - uncompressed• Windows metafile•
Supported Report Formats1-11Supported Report FormatsWhen the report-generation process first creates a report, it generates a DocBookXML source file.
10 Components — Alphabetical List10-22• Custom: Specifies a custom image size. Set the image size in the Size field andUnits list.• Size: Specifies th
Figure Snapshot10-23• Right• Left• Center• Title: Specifies a title for the figure:• Custom: Specifies a custom title.• Name: Specifies the figure na
10 Components — Alphabetical List10-24For LoopIteratively execute child componentsDescriptionThis component functions like the MATLAB for loop, except
For Loop10-25Insert Anything into Report?No.Classrptgen_lo.clo_forSee AlsoLogical Else, Logical Elseif, Logical If, Logical Then, While Loop
10 Components — Alphabetical List10-26Graphics Object LoopRun child components for each Handle Graphics object open in MATLAB workspaceDescriptionThis
Graphics Object Loop10-27Classrptgen_hg.chg_obj_loopSee AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Handle GraphicsLinking Anchor, Ha
10 Components — Alphabetical List10-28Handle Graphics Linking AnchorDesignate location to which links pointDescriptionThis component designates a loca
Handle Graphics Linking Anchor10-29See AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Graphics ObjectLoop, Handle Graphics Name, Handle
10 Components — Alphabetical List10-30Handle Graphics NameInsert name of Handle Graphics object into the reportDescriptionThis component inserts the n
Handle Graphics Name10-31See AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Graphics ObjectLoop, Handle Graphics Linking Anchor, Handle
Revision HistoryJanuary 1999 First printing New (Release 11)December 2000 Second printing Revised (Release 12)June 2004 Third printing Revised for Ver
10 Components — Alphabetical List10-32Handle Graphics ParameterInsert property name/property value pair from Handle Graphics figure, axes, or otherobj
Handle Graphics Parameter10-33• Auto table/paragraph: Displays as a table or paragraph.• Inline text: Displays in line with the surrounding text.• Pa
10 Components — Alphabetical List10-34Handle Graphics Property TableInsert table that reports on property name/property value pairsDescriptionThis com
Handle Graphics Property Table10-35To apply a preset table, select the table and click Apply.• Split property/value cells: Splits property name/prope
10 Components — Alphabetical List10-36• Double justified• Show as: Enables you to choose the format for the contents of the table cell. Optionsinclude
Handle Graphics Summary Table10-37Handle Graphics Summary TableInsert table that summarizes Handle Graphics object propertiesDescriptionThis componen
10 Components — Alphabetical List10-38Some entries in the list of available properties (such as Depth) are “virtual”properties which you cannot access
Handle Graphics Summary Table10-39• Loop type:• All axes: Loops on all axes objects.• Current axes: Loops on the selected axes object.• Exclude objec
10 Components — Alphabetical List10-40See AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Graphics ObjectLoop, Handle Graphics Linking Anc
Image10-41ImageInsert image from external file into reportDescriptionThis component inserts an image from an external file into the report. It can ha
2Create Your First Report• “Create a MATLAB Report” on page 2-2• “Create a Report Setup File” on page 2-3• “Add Report Content Using Components” on pa
10 Components — Alphabetical List10-42• Use image size: Causes the image to appear the same size in the report as onscreen (default).• Fixed size: Spe
Image10-43Classrptgen.cfr_imageSee AlsoChapter/Subsection, Empty Component, List, Paragraph, Table, Text, TitlePage
10 Components — Alphabetical List10-44Import FileImport ASCII text file into reportDescriptionThis component imports an ASCII text file into the repor
Import File10-45There is a blank line above the third row.• Paragraphs defined by empty rows: Imports the file as text, in paragraphswith empty rows
10 Components — Alphabetical List10-46• Text (retain line breaks)• Fixed-width text (retain line breaks)• Inserts paragraphs if you select one of the
Insert Variable10-47Insert VariableInsert variable values into reportDescriptionThis component inserts the value (and, optionally, the name) of each
10 Components — Alphabetical List10-48• Array size limit: Limits the width of the display in the generated report. Unitsare in pixels. The size limit
Insert Variable10-49See AlsoEvaluate MATLAB Expression, MATLAB Property Table, MATLAB/ToolboxVersion Number, Variable Table
10 Components — Alphabetical List10-50LinkInsert linking anchors or pointers into reportDescriptionThis component inserts linking anchors or pointers
Link10-51• Emphasize link text: Italicizes the link text.ExamplesLink to an External Web Site1Open Report Explorer with the setedit command.2In the P
2 Create Your First Report2-2Create a MATLAB ReportThis example shows how to create a report that explains and illustrates magic squares –matrices who
10 Components — Alphabetical List10-528Click the link to open the MathWorks Web site.Link to Another Place in a Report1At the MATLAB command line, ent
Link10-53• In Link text, enter For a detailed explanation, click here. (with theperiod).9Generate the report.
10 Components — Alphabetical List10-5410Click the link to move to near the top of the report, to “Chapter 1. Magic SquaresExplained.”.
Link10-55Link to a ModelThis example shows how to add a link to a Simulink model. To view the model, you musthave the Simulink software installed.1Op
10 Components — Alphabetical List10-567Click the “Open model” link to open the model.Insert Anything into Report?Yes. Text or anchor.Classrptgen.cfr_l
List10-57ListCreate bulleted or numbered list from cell array or child componentsDescriptionThis component creates a bulleted or numbered list from a
10 Components — Alphabetical List10-58• Numbered list.• Numbering style: Specifies a numbering style for numbered lists. This setting issupported only
List10-591. Example2. Example 1. Example 2. Example 1. Example 2. Example3. ExampleThis option is not available if you select Show parent number in
10 Components — Alphabetical List10-60• red• green• blueUse the following report setup file:[-] Report - Unnamed.rpt [-] Bulleted list from child co
Logical Else10-61Logical ElseSpecify an else condition for a Logical If componentDescriptionThis component acts as an else when it is the child of th
Create a Report Setup File2-3Create a Report Setup FileTo set up the magic squares report, first create a setup file to store the setup. Then addMATL
10 Components — Alphabetical List10-62See AlsoFor Loop, Logical Elseif, Logical If, Logical Then, While Loop
Logical Elseif10-63Logical ElseifSpecify an elseif condition for a Logical If componentDescriptionThis component acts as an elseif when it is the chi
10 Components — Alphabetical List10-64Logical IfSpecify logical if conditionDescriptionThis component acts as a logical if; it can have the Logical Th
Logical If10-65Classrptgen_lo.clo_ifSee AlsoFor Loop, Logical Else, Logical Elseif, Logical Then, While Loop
10 Components — Alphabetical List10-66Logical ThenSpecify a then condition for a Logical If componentDescriptionThis component acts as a then when it
Logical Then10-67See AlsoFor Loop, Logical Else, Logical Elseif, Logical If, While Loop
10 Components — Alphabetical List10-68MATLAB Property TableInsert table that includes MATLAB object property name/property value pairsDescriptionThis
MATLAB Property Table10-69• Table Cells: Modifies table properties. The selection in this pane affects the availablefields in the Cell Properties pan
10 Components — Alphabetical List10-70Insert Anything into Report?Yes. Table.Classrptgen.cml_prop_tableSee AlsoEvaluate MATLAB Expression, Insert Vari
MATLAB/Toolbox Version Number10-71MATLAB/Toolbox Version NumberInsert table that shows version and release numbers and release date of MathWorksprodu
2 Create Your First Report2-4The new file name appears in the Outline pane.To create the content for the report, see “Add Report Content Using Compone
10 Components — Alphabetical List10-72Table Columns• Version number: Includes the product version number (for example, 3.4) for allinstalled MathWorks
Nest Setup File10-73Nest Setup FileAllow one report setup file (rpt file) to run inside anotherDescriptionThis component runs another report setup fi
10 Components — Alphabetical List10-74The Nest Setup File dialog box displays the report description of the nested report, if thenested report has a r
Paragraph10-75ParagraphInsert paragraph text into reportDescriptionThis component inserts a paragraph into the report. The paragraph text is taken fr
10 Components — Alphabetical List10-76to generate the report. For more information about template styles, see “ReportConversion Templates”.Paragraph T
Paragraph10-77StyleNote: If you use the Style Name field to specify a style for the paragraph text, the styleformats below override the corresponding
10 Components — Alphabetical List10-78See AlsoChapter/Subsection, Empty Component, Image, Link, List, Table, Text, TitlePage
Stop Report Generation10-79Stop Report GenerationHalt report generationDescriptionThis component acts like Stop during report generation. You can use
10 Components — Alphabetical List10-80Insert Anything into Report?No.Classrptgen.crg_halt_genSee AlsoComment, Import File, Nest Setup File, Time/Date
Table10-81TableInsert parent of tableDescriptionThis component is a parent of a component hierarchy that you specify to insert a tableinto a report.
Add Report Content Using Components2-5Add Report Content Using ComponentsIn this section...“Report Components” on page 2-5“Specify Report Variables”
10 Components — Alphabetical List10-82• Word (from template)• HTML (from template)• PDF (from template)2Set Table style name to Specify.3In the Table
Table10-83• Right: Aligns content with the right side of the column• Double justified: Justifies the left and right sides of the entry content, toavo
10 Components — Alphabetical List10-84See AlsoTable Body, Table Column Specification, Table Entry, Table Footer,Table Header, Table Row, Array-Based T
Table Body10-85Table BodyInsert parent of table bodyDescriptionThis component is a parent of the rows that define the body of a table.This component
10 Components — Alphabetical List10-86Insert Anything into Report?Yes. Table.Classrptgen.cfr_ext_table_bodySee AlsoTable, Table Column Specification,
Table Column Specification10-87Table Column SpecificationSpecify table column propertiesDescriptionSpecifies the format of a table column. Add a Tabl
10 Components — Alphabetical List10-88• Left: Aligns content with the left side of the column.• Center: Aligns content in the middle of the column.• R
Table Entry10-89Table EntryInsert table entryDescriptionSpecifies the format of a table entry.This component must be a child of a descendant of a Tab
10 Components — Alphabetical List10-90• Row separator: Use this property to override the Row separator setting of theTable Row component for the row i
Table Entry10-91Insert Anything into Report?Yes. Table.Classrptgen.cfr_ext_table_entrySee AlsoTable, Table Body, Table Column Specification, Table Fo
2 Create Your First Report2-6Title PagecomponentChaptercomponentTextcomponentFigureSnapshotcomponentTextcomponent
10 Components — Alphabetical List10-92Table FooterInsert parent of table footerDescriptionThis component is a parent of the Table Row components that
Table Footer10-93Classrptgen.cfr_ext_table_footSee AlsoTable, Table Body, Table Column Specification, Table Entry, Table Header,Table Row, Array-Base
10 Components — Alphabetical List10-94Table HeaderInsert parent of table headerDescriptionThis component is a parent of the Table Row components that
Table Header10-95Classrptgen.cfr_ext_table_headSee AlsoTable, Table Body, Table Column Specification, Table Entry, Table Footer,Table Row, Array-Base
10 Components — Alphabetical List10-96Table RowInsert parent of table row entriesDescriptionThis component is a parent of Table Entry components that
Table Row10-97To override the text rotation for a specific table entry, use the Table Entry Textorientation property for that table entry.• Rotated t
10 Components — Alphabetical List10-98TextFormat and insert text into reportDescriptionThis component formats and inserts text into the report. It mus
Text10-99Example1Enter the following text:I have a %<ObjName> and it has %<NumLeaves> leaves. The word '%<ObjName>' has %
10 Components — Alphabetical List10-100• Enter an RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shade ofblue.Insert Anything into Report
Time/Date Stamp10-101Time/Date StampInsert time and date of report generation into reportDescriptionThis component inserts the time and date of the r
Add Report Content Using Components2-7Specify Report VariablesThe magic squares report uses variables defined in the MATLAB workspace to specifythe n
10 Components — Alphabetical List10-102• Date order: Specifies the order in which the day, month, and year appear. Optionsinclude:• Day Month Year• Mo
Time/Date Stamp10-103Classrptgen.crg_tdsSee AlsoComment, Import File, Nest Setup File, Stop Report Generation
10 Components — Alphabetical List10-104Title PageInsert title page at beginning of reportDescriptionThis component inserts a title page at the beginni
Title Page10-105• No author: Does not specify an author name.• Automatic author: Automatically includes your user name as the author name.The author
10 Components — Alphabetical List10-106• Alignment: Only reports in PDF or RTF format support this property. Optionsinclude:• Auto• Right• Left• Cente
Title Page10-107• Italic: Makes the text italic.• Underline: Underlines the text.• Strikethrough: Strikes through the text.• Retain spaces and carria
10 Components — Alphabetical List10-108• Bold: Makes the text bold.• Italic: Makes the text italic.• Underline: Underlines the text.• Strikethrough: S
Variable Table10-109Variable TableInsert table that displays all the variables in the MATLAB workspaceDescriptionThis component inserts a table that
10 Components — Alphabetical List10-110Note: Large variable arrays collapse to [MxN CLASS]. For example, if you have a300-by-200 double array, it appe
While Loop10-111While LoopIteratively execute child components while a specified condition is trueDescriptionThis component iteratively executes its
2 Create Your First Report2-8The icon in the upper left corner of the Eval component indicates that thiscomponent cannot have child components. By def
10 Components — Alphabetical List10-112Classrptgen_lo.clo_whileSee AlsoFor Loop, Logical Else, Logical Elseif, Logical If, Logical Then
11Functions – Alphabetical List
11 Functions – Alphabetical List11-2compwizCreate custom MATLAB Report Generator componentsSyntaxcompwizcompwiz ('–browse')compwiz ('–v
append11-3appendClass: mlreportgen.dom.ContainerPackage: mlreportgen.domAppend DOM object to containerSyntaxdomObjOut = append(containerObj,domObj)De
11 Functions – Alphabetical List11-4• mlreportgen.dom.HTML• mlreportgen.dom.HTMLFile• mlreportgen.dom.Image• mlreportgen.dom.InternalLink• mlreportgen
append11-5• mlreportgen.dom.Paragraph• mlreportgen.dom.RawText• mlreportgen.dom.Table• mlreportgen.dom.Text• mlreportgen.dom.TemplateHole• mlreportge
11 Functions – Alphabetical List11-6cloneClass: mlreportgen.dom.ContainerPackage: mlreportgen.domCopy container objectSyntaxclonedContainer = clone(so
clone11-7import mlreportgen.dom.*;rpt = Document('MyReport','docx'); c = Container();Color all of the text in this container red.
11 Functions – Alphabetical List11-8mlreportgen.dom.CustomElement.appendPackage: mlreportgen.domAppend HTML content to custom elementSyntaxcustomEleme
mlreportgen.dom.CustomElement.append11-9append(d,ol);close(d);rptview('test','html');• “Add Content to a Report”Input Argumentscu
Add Report Content Using Components2-9%This MATLAB code sets up two variables%that define how the report runs.%magicSizeVector is a list of MxM%Magic
11 Functions – Alphabetical List11-10addHTMLClass: mlreportgen.dom.DocumentPackage: mlreportgen.domAppend HTML string to documentSyntaxhtmlObjOut = ad
addHTML11-11HTML object with appended content, returned as an mlreportgen.dom.HTML object.ExamplesAppend HTML Text to DocumentCreate an HTML object f
11 Functions – Alphabetical List11-12addHTMLFileClass: mlreportgen.dom.DocumentPackage: mlreportgen.domAppend HTML file contents to documentSyntaxdocu
addHTMLFile11-13ExamplesAppend HTML File Contents to a DocumentIn a text editor, create a file and enter this text:<!DOCTYPE html><html>&
11 Functions – Alphabetical List11-14More About• “Appending HTML to DOM Reports”Introduced in R2015a
mlreportgen.dom.Document.append11-15mlreportgen.dom.Document.appendPackage: mlreportgen.domAppend DOM or MATLAB object to documentSyntaxdomObjOut = a
11 Functions – Alphabetical List11-16import mlreportgen.dom.*;d = Document('mydoc','html');ol = OrderedList({'first step&apos
mlreportgen.dom.Document.append11-17Example: myTextObj = append(myDocument,'This is an introduction')listContent — Items to append to the d
11 Functions – Alphabetical List11-18• A string• A number• A Boolean value• One of the following DOM objects:• mlreportgen.dom.Text• mlreportgen.dom.P
mlreportgen.dom.Document.append11-19• mlreportgen.dom.HTML• mlreportgen.dom.Image• mlreportgen.dom.InternalLink• mlreportgen.dom.LinkTarget• mlreport
2 Create Your First Report2-101In the Outline pane on the left, select the Eval component.2In the Options pane in the middle, under the Formatting cat
11 Functions – Alphabetical List11-20• mlreportgen.dom.Text• mlreportgen.dom.UnorderedListSee Alsomlreportgen.dom.Document
mlreportgen.dom.Document.close11-21mlreportgen.dom.Document.closePackage: mlreportgen.domClose documentSyntaxclose(docObj)Descriptionclose(docObj) cl
11 Functions – Alphabetical List11-22Document to close, specified as an mlreportgen.dom.Document object.See Alsomlreportgen.dom.Document | mlreportgen
mlreportgen.dom.Document.createAutoNumberStream11-23mlreportgen.dom.Document.createAutoNumberStreamPackage: mlreportgen.domCreate numbering streamSyn
11 Functions – Alphabetical List11-24 p = Paragraph('Chapter '); p.Style = {CounterInc('chapter')}; p.WhiteSpace = '
mlreportgen.dom.Document.createAutoNumberStream11-25Use a number, regardless of the type of stream. The initial value used by the streamdepends on th
11 Functions – Alphabetical List11-26mlreportgen.dom.Document.createTemplatePackage: mlreportgen.domCreate DOM templateSyntaxcreateTemplate(path)creat
mlreportgen.dom.Document.createTemplate11-27Input Argumentspath — Path for new templatestringIf you use the path argument without the type argument,
11 Functions – Alphabetical List11-28mlreportgen.dom.Document.fillPackage: mlreportgen.domFill document holes with generated contentSyntaxfill()Descri
mlreportgen.dom.Document.fill11-29 end methods function rpt = MyReport(filename,type,template) rpt = [email protected]
Add Report Content Using Components2-11aIn the Title text box, enter Magic Squares.bIn the Subtitle text box, enter Columns, Rows, Diagonals: Everyon
11 Functions – Alphabetical List11-30mlreportgen.dom.Document.getAutoNumberStreamPackage: mlreportgen.domReturn numbering streamSyntaxautoNumStreamOut
mlreportgen.dom.Document.getAutoNumberStream11-31Input ArgumentsdocObj — Document that uses numbering streammlreportgen.dom.Document objectDocument t
11 Functions – Alphabetical List11-32mlreportgen.dom.Document.getCorePropertiesPackage: mlreportgen.domGet document or template core propertiesSyntaxc
mlreportgen.dom.Document.getCoreProperties11-33 LastModifiedBy: '' Revision: '2' Subject: [] Ti
11 Functions – Alphabetical List11-34mlreportgen.dom.Document.getImageDirectoryPackage: mlreportgen.domGet image folder of documentSyntaximageDirector
mlreportgen.dom.Document.getImageDirectory11-35type — Type of document or package'docx' | 'html'Type document or template. For a
11 Functions – Alphabetical List11-36mlreportgen.dom.Document.getImagePrefixPackage: mlreportgen.domGet generated image name prefixSyntaximagePrefix =
mlreportgen.dom.Document.getImagePrefix11-37Path of the document or template packagetype — Type of document or package'docx' | 'html&a
11 Functions – Alphabetical List11-38mlreportgen.dom.Document.getMainPartPathPackage: mlreportgen.domReturn path of main part of document output packa
mlreportgen.dom.Document.getMainPartPath11-39Output ArgumentspathOut — Path of main part of document output packagestringPath of the main part of doc
2 Create Your First Report2-12The pane should look as follows:5Save the report.Add a ChapterNote: This section builds on the previous tasks described
11 Functions – Alphabetical List11-40mlreportgen.dom.Document.getOPCMainPartPackage: mlreportgen.domReturn main part of document, document part, or te
mlreportgen.dom.Document.getOPCMainPart11-41mlreportgen.dom.Document.getOPCMainPart('MyDoc.htmx','html')ans =/root.htmlInput Argu
11 Functions – Alphabetical List11-42• “Report Packages”See Alsomlreportgen.dom.Document.getMainPartPath |mlreportgen.dom.Document.setCoreProperties |
mlreportgen.dom.Document.moveToNextHole11-43mlreportgen.dom.Document.moveToNextHolePackage: mlreportgen.domMove document append point to next templat
11 Functions – Alphabetical List11-44Output ArgumentsholeID — Template hole IDhole IDThe ID of the template hole that the method moves to (the new cur
mlreportgen.dom.Document.open11-45mlreportgen.dom.Document.openPackage: mlreportgen.domOpen documentSyntaxopen(docObj)Descriptionopen(docObj) opens a
11 Functions – Alphabetical List11-46More AboutTips• After you open a document, you can no longer change its generated document type orthe template.•
mlreportgen.dom.Document.package11-47mlreportgen.dom.Document.packagePackage: mlreportgen.domAdd OPC part files to document packageSyntaxpartOut = pa
11 Functions – Alphabetical List11-48Document OPC package to add files to, specified as an mlreportgen.dom.Documentobject.opcPart — OPC part that spec
mlreportgen.dom.Document.setCoreProperties11-49mlreportgen.dom.Document.setCorePropertiesPackage: mlreportgen.domSet OPC core properties of output do
Add Report Content Using Components2-13If you have not completed the previous sections of this example, see open the completedreport setup file: Magi
11 Functions – Alphabetical List11-50Path of document, document part, or template, specified as a string.corePropertiesObj — OPC core properties to us
mlreportgen.dom.ExternalLink.append11-51mlreportgen.dom.ExternalLink.appendPackage: mlreportgen.domAppend custom element to external linkSyntaxextern
11 Functions – Alphabetical List11-52Text to append, specified as a string.styleName — Name of style to apply to appended text stringstringThe style t
mlreportgen.dom.FormalTable.appendFooterRow11-53mlreportgen.dom.FormalTable.appendFooterRowPackage: mlreportgen.domAppend row to table footerSyntaxro
11 Functions – Alphabetical List11-54footerRow = appendFooterRow(table,rowForFooter);close(myReport);rptview('myDoc','html');• “Cr
mlreportgen.dom.FormalTable.appendHeaderRow11-55mlreportgen.dom.FormalTable.appendHeaderRowPackage: mlreportgen.domAppend row to table headerSyntaxro
11 Functions – Alphabetical List11-56headerRow = appendHeaderRow(table,rowForHeader);close(myReport);rptview('myDoc','html');• “Cr
mlreportgen.dom.Group.append11-57mlreportgen.dom.Group.appendPackage: mlreportgen.domAdd DOM object to groupSyntaxdomObjOut = append(groupObj,domObj)
11 Functions – Alphabetical List11-58Input ArgumentsgroupObj — Group object to append DOM object tomlreportgen.dom.Group objectGroup object to append
mlreportgen.dom.Group.append11-59You can append the following DOM objects:• mlreportgen.dom.CustomElement• mlreportgen.dom.DocumentPart• mlreportgen.
2 Create Your First Report2-14Add Introductory Text to the First ChapterNote: This section builds on the previous tasks described in the step-by-step
11 Functions – Alphabetical List11-60appendClass: mlreportgen.dom.HTMLPackage: mlreportgen.domAppend HTML string to HTML objectSyntaxhtmlObjOut = appe
append11-61Output ArgumentshtmlObjOut — HTML object with appended contentan mlreportgen.dom.HTML objectHTML object with appended content, returned as
11 Functions – Alphabetical List11-62cloneClass: mlreportgen.dom.HTMLPackage: mlreportgen.domCopy HTML objectSyntaxclonedHTMLObj = clone(sourceHTMLObj
clone11-63import mlreportgen.dom.*;rpt = Document('ClonedHTMLReport','docx'); htmlObj1 = HTML('<p><b>Hello&l
11 Functions – Alphabetical List11-64appendClass: mlreportgen.dom.HTMLFilePackage: mlreportgen.domAppend HTML to HTMLFile objectSyntaxhtmlFileObjOut =
append11-65HTML object to append, specified as an mlreportgen.dom.HTML object.htmlFileObjToAppend — HTMLFile object to appendmlreportgen.dom.HTMLFile
11 Functions – Alphabetical List11-66See Alsomlreportgen.dom.HTML | mlreportgen.dom.HTMLFileMore About• “Appending HTML to DOM Reports”Introduced in R
mlreportgen.dom.LinkTarget.append11-67mlreportgen.dom.LinkTarget.appendPackage: mlreportgen.domAppend content to link targetSyntaxtextObj = append(ta
11 Functions – Alphabetical List11-68append(d,target);append(d,InternalLink('home','Go to Top');close(d);rptview('mydoc'
mlreportgen.dom.LinkTarget.append11-69styleName — Name of stylestringName of style, specified as a string.textObj — Text object containing the text t
Add Report Content Using Components2-153By default, the Paragraph component inherits its text from its child components.Add two Text components.Note:
11 Functions – Alphabetical List11-70mlreportgen.dom.MessageDispatcher.dispatchPackage: mlreportgen.domDispatch DOM status messageSyntaxdispatch(dispa
mlreportgen.dom.MessageDispatcher.dispatch11-71close(d);rptview('test',doctype); delete (l); Check the progress messages in the MATLAB
11 Functions – Alphabetical List11-72mlreportgen.dom.MessageDispatcher.getTheDispatcherPackage: mlreportgen.domReturn DOM message dispatcherSyntaxgetT
mlreportgen.dom.MessageDispatcher.getTheDispatcher11-73append(d, p); close(d);rptview('test',doctype); delete (l); Check the progre
11 Functions – Alphabetical List11-74mlreportgen.dom.OrderedList.appendPackage: mlreportgen.domAppend content to ordered listSyntaxlistOut = append(or
mlreportgen.dom.OrderedList.append11-75close(myReport);rptview('myDoc','html');Append an Unordered Listimport mlreportgen.dom.*;m
11 Functions – Alphabetical List11-76Ordered list to append content to, specified as an mlreportgen.dom.OrderedListobject.listItemObj — List item to a
mlreportgen.dom.OrderedList.append11-77The custom element must be a valid HTML or Word child of a list, depending on whetherthe output type of the do
11 Functions – Alphabetical List11-78mlreportgen.dom.Paragraph.appendPackage: mlreportgen.domAppend content to paragraphSyntaxparaObjOut = append(para
mlreportgen.dom.Paragraph.append11-79rptview('mydoc','html');Specify a Style for Appended Textimport mlreportgen.dom.*;doc = Docu
2 Create Your First Report2-16square (shown in the upper right portion of the image)could aid in the cure of melancholy. The engraving's date (15
11 Functions – Alphabetical List11-80styleName — Name of a style to apply to textstringName of the style to define the appearance of the text. Use a s
mlreportgen.dom.Paragraph.clone11-81mlreportgen.dom.Paragraph.clonePackage: mlreportgen.domCopy paragraph objectSyntaxclonedPara = clone(sourcePara)D
11 Functions – Alphabetical List11-82 Underline: [] WhiteSpace: [] FontFamilyName: [] FontSize: [] Str
mlreportgen.dom.Paragraph.clone11-83• When you clone a paragraph, DOM copies all of the children objects of the sourceparagraph, but not the parent o
11 Functions – Alphabetical List11-84p.Italicans = 13For the cloned paragraph, change turn off bold text. The change to the Boldformat in the clon
mlreportgen.dom.ProgressMessage.formatAsHTML11-85mlreportgen.dom.ProgressMessage.formatAsHTMLPackage: mlreportgen.domWrap message in HTML tagsSyntaxh
11 Functions – Alphabetical List11-86append(d,p);close(d);rptview('test',doctype); delete (l);• “Display Report Generation Messages”Inpu
mlreportgen.dom.ProgressMessage.formatAsText11-87mlreportgen.dom.ProgressMessage.formatAsTextPackage: mlreportgen.domFormat message as textSyntaxtext
11 Functions – Alphabetical List11-88append(d,p);close(d);rptview('test',doctype); delete(l);• “Display Report Generation Messages”Input
mlreportgen.dom.ProgressMessage.passesFilter11-89mlreportgen.dom.ProgressMessage.passesFilterPackage: mlreportgen.domDetermine if message passes filt
Add Report Content Using Components2-174With the Eval component still selected, do the following in the Properties pane onthe right:aClear the Insert
11 Functions – Alphabetical List11-90p.Tag = 'chapter title';p.Style = { CounterInc('chapter'),... CounterReset('table&apo
mlreportgen.dom.ProgressMessage.passesFilter11-91See Alsomlreportgen.dom.MessageFilter | mlreportgen.dom.ProgressMessage
11 Functions – Alphabetical List11-92mlreportgen.dom.Table.entryPackage: mlreportgen.domAccess table entrySyntaxtableEntryOut = entry(tableObj,row,col
mlreportgen.dom.Table.entry11-93row — Table row containing the entrynumberIndex number of the row (top row is row 1).Data Types: doublecolumn — Colum
11 Functions – Alphabetical List11-94mlreportgen.dom.Table.rowPackage: mlreportgen.domAccess table rowSyntaxtableRowOut = row(tableObj,row)Description
mlreportgen.dom.Table.row11-95Table containing the entry, specified as an mlreportgen.dom.Table ormlreportgen.dom.FormalTable object.row — Table rown
11 Functions – Alphabetical List11-96mlreportgen.dom.TableRow.appendPackage: mlreportgen.domAppend content to table rowSyntaxentryOut = append(rowObj,
mlreportgen.dom.TableRow.append11-97endAppend the table and display the report.append(myReport,table);close(myReport);rptview('myDoc',&apos
11 Functions – Alphabetical List11-98reportGenerate reports from report setup fileSyntaxreportreport (filename,...)report ( ___ ,-oOPATH)report ( ___
report11-99• -graphical — Shows hierarchy in Report Explorer• -debug — Enables debug mode• -quiet — Sets error echo level to 0• -sSTYLESHEETNAME — Se
2 Create Your First Report2-18This MATLAB code displays the Dürer etching in a MATLAB figure window.cIn the Evaluate expression if there is an error t
11 Functions – Alphabetical List11-100More About• “Generate Reports”See Alsosetedit | rptconvert | rptlist | compwiz
rptconvert11-101rptconvertConvert DocBook XML files into supported document formatsSyntaxrptconvert()rptname = rptconvert (source)rptname = rptconver
11 Functions – Alphabetical List11-102format is a unique identifier code for each output format type. If you omit thisargument, the XML file is conver
rptlist11-103rptlistRetrieve list of all report setup files in MATLAB pathSyntaxrptlistrptlist ('system_name')list = rptlistDescriptionrptl
11 Functions – Alphabetical List11-104rptviewDisplay DOM reportSyntaxrptview(reportPath)rptview(reportPath,'pdf')rptview(reportName,format)D
rptview11-105rptview('mydoc.htmx');Convert a Word Report and Display It in a PDF ViewerUse the rptview function to convert a Word report to
11 Functions – Alphabetical List11-106close(dWord);rptview('mydoc','docx');Input ArgumentsreportPath — Report file path including
setedit11-107seteditStart Report ExplorerSyntaxsetedit (filename)Descriptionsetedit (filename) opens the Report Explorer and loads the report setup f
11 Functions – Alphabetical List11-108unzipTemplateUnzip zipped DOM templateSyntaxunzipTemplate(zippedTemplatePath)unzipTemplate(zippedTemplatePath,un
unzipTemplate11-109If you do not include a file extension in the path, the function assumes the extension is.htmtx.If you do not use the unzippedTemp
Add Report Content Using Components2-195In the Outline pane on the left, select the Eval component.6In the Library pane in the middle, under the Hand
11 Functions – Alphabetical List11-110zipTemplatePackage DOM HTML template in zip fileSyntaxzipTemplate(unzippedTemplateFolder)zipTemplate(zippedTempl
zipTemplate11-111root.html and your document part template library file, if it exists, is in a file calleddocpart_templates.html.zipTemplate(zippedTe
11 Functions – Alphabetical List11-112Full path for the zipped DOM template, including the file extension .htmtx, specified asa string.mainDocument —
zipTemplate11-113If the unzipped template stores images in a folder other than one named images inthe root folder of the template, include a text fil
12Classes – Alphabetical List
12 Classes – Alphabetical List12-2mlreportgen.dom.AllowBreakAcrossPages classPackage: mlreportgen.domAllow row to straddle page breakDescriptionSpecif
mlreportgen.dom.AllowBreakAcrossPages class12-3PropertiesId — ID for document elementstringA session-unique ID is generated as part of document eleme
12 Classes – Alphabetical List12-4mlreportgen.dom.AutoNumber classPackage: mlreportgen.domAutomatically generated numberDescriptionAutomatically gener
mlreportgen.dom.AutoNumber class12-5Name of number style defined in the template, specified as a string. The style specifiedby styleName must be defi
vContentsGetting Started1MATLAB Report Generator Product Description . . . . . . . . . 1-2Key Features . . . . . . . . . . . . . . . . . . . . . . . .
2 Create Your First Report2-20To inline an image component (such as Image or Figure Snapshot), include it withina Paragraph component.7In the Properti
12 Classes – Alphabetical List12-6• The name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.html.• A hexadec
mlreportgen.dom.AutoNumber class12-7• pt — points• px — pixelId — ID for document elementstringA session-unique ID is generated as part of document e
12 Classes – Alphabetical List12-8The style specified by styleName must be defined in the template used to create thedocument element to which this nu
mlreportgen.dom.AutoNumber class12-9Border String Description Supported Output Typessingle Single line HTML and Wordthick Thick line Wordwave Wavy li
12 Classes – Alphabetical List12-10Border String Description Supported Output Typespre Preserves white space. Textwraps only on line breaks.Acts like
mlreportgen.dom.AutoNumber class12-11doctype = 'html';d = Document('test',doctype);p = Paragraph('Chapter ');p.Style =
12 Classes – Alphabetical List12-12mlreportgen.dom.AutoNumberStream classPackage: mlreportgen.domNumbering streamDescriptionA numbering stream generat
mlreportgen.dom.AutoNumberStream class12-13The value of this property should be one less than the number that you want to begenerated first. For exam
12 Classes – Alphabetical List12-14mlreportgen.dom.BackgroundColor classPackage: mlreportgen.domBackground color of document elementDescriptionSpecifi
mlreportgen.dom.BackgroundColor class12-15Background color for a report object, represented by amlreportgen.dom.BackgroundColor objectPropertiesHexVa
Add Report Content Using Components2-21The next three steps set up the report to delete the image from the MATLABworkspace after the image has been a
12 Classes – Alphabetical List12-16ExamplesCreate and Apply a Background ColorCreate a deep sky blue background color object and apply it to a paragra
mlreportgen.dom.Bold class12-17mlreportgen.dom.Bold classPackage: mlreportgen.domBold for text objectDescriptionSpecifies whether to use bold for a t
12 Classes – Alphabetical List12-18A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate
mlreportgen.dom.Bold class12-19rptview('test',doctype);See Alsomlreportgen.dom.ItalicMore About• “Report Formatting Approaches”
12 Classes – Alphabetical List12-20mlreportgen.dom.Border classPackage: mlreportgen.domBorder properties of objectDescriptionSpecifies the border prop
mlreportgen.dom.Border class12-21Applies ToStringDOCX HTML'dashsmallgap' X 'dotted' X X'dotdash' X 'dotdotdash&a
12 Classes – Alphabetical List12-22You can specify:• The name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color
mlreportgen.dom.Border class12-23• A hexadecimal RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shadeof blue.Id — ID for document elemen
12 Classes – Alphabetical List12-24• px — pixelBottomColor — Bottom border segment colorstringBottom border segment color, specified as a string.Botto
mlreportgen.dom.Border class12-25Left border segment width, specified as a string.RightColor — Right border segment colorstringRight border segment c
2 Create Your First Report2-22• “Create the Magic Square” on page 2-29• “Add Display Logic” on page 2-32• “Display the Magic Square” on page 2-34Creat
12 Classes – Alphabetical List12-26mlreportgen.dom.BorderCollapse classPackage: mlreportgen.domCollapse HTML table bordersDescriptionSpecifies whether
mlreportgen.dom.BorderCollapse class12-27A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the g
12 Classes – Alphabetical List12-28p = Paragraph('Separate Borders');append(d,p);table = Table(magicArray);table.Style = {Border('solid
mlreportgen.dom.CharEntity class12-29mlreportgen.dom.CharEntity classPackage: mlreportgen.domCreate character entity referenceDescriptionCreate a ref
12 Classes – Alphabetical List12-30Output ArgumentscharEntityObj — Reference to a character entitymlreportgen.dom.CharEntity objectReference to a char
mlreportgen.dom.CharEntity class12-31Content — Text string contained by this document elementstringText string contained by this document element.Cus
12 Classes – Alphabetical List12-32• pi — picas• pt — points• px — pixelId — ID for document elementstringA session-unique ID is generated as part of
mlreportgen.dom.CharEntity class12-33• double — Use a double line for strikethrough for Word documentsSetting the Strike property adds a correspondin
12 Classes – Alphabetical List12-34Border String Description Supported Output TypesdashDotDotHeavy Line with heavy dasheswith two dots betweenthe dash
mlreportgen.dom.CharEntity class12-35To specify how to handle white space, use one of the following strings.Border String Description Supported Outpu
Add Report Content Using Components2-23This For Loop component appears inside the Chapter component. However, themagic squares should be processed af
12 Classes – Alphabetical List12-36Method PurposeUse CharEntity.append in a similar wayto how you use ExternalLink.append.cloneUse CharEntity.clone in
mlreportgen.dom.CharEntity class12-37More About• “Report Formatting Approaches”
12 Classes – Alphabetical List12-38mlreportgen.dom.Color classPackage: mlreportgen.domColor of document elementDescriptionSpecifies the color of a doc
mlreportgen.dom.Color class12-39Color for document element, represented by an mlreportgen.dom.Color object.PropertiesHexValue — hexidecimal color val
12 Classes – Alphabetical List12-40import mlreportgen.dom.*;doctype = 'html';d = Document('test',doctype);colorfulStyle = {Bold,Co
mlreportgen.dom.ColSep class12-41mlreportgen.dom.ColSep classPackage: mlreportgen.domDraw lines between table columnsDescriptionDraw lines between ta
12 Classes – Alphabetical List12-42Applies ToStringDOCX HTML'dashsmallgap' X 'dotted' X X'dotdash' X 'dotdotdash&
mlreportgen.dom.ColSep class12-43You can specify:• The name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.
12 Classes – Alphabetical List12-44• A hexadecimal RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shadeof blue.Id — ID for document eleme
mlreportgen.dom.ColSep class12-45• mm — millimeters• pi — picas• pt — points• px — pixelData Types: charExamplesSpecify Table Column FormattingSet th
2 Create Your First Report2-24aIn the End text box, replace the existing text with the following text:length(magicSizeVector)This is the length of the
12 Classes – Alphabetical List12-46mlreportgen.dom.Container classPackage: mlreportgen.domContainer of document objectsDescriptionCreates a container
mlreportgen.dom.Container class12-47• Use a group object to append the same content in multiple places in a documentwithout cloning the group.Constru
12 Classes – Alphabetical List12-48Children — Children of containercell array of mlreportgen.dom.Element objectsThis read-only property lists child el
mlreportgen.dom.Container class12-49Tag for document element, specified as a string.A session-unique ID is generated as part of document element crea
12 Classes – Alphabetical List12-50See Alsomlreportgen.dom.GroupIntroduced in R2015a
mlreportgen.dom.CoreProperties class12-51mlreportgen.dom.CoreProperties classPackage: mlreportgen.domOPC core properties of document or templateDescr
12 Classes – Alphabetical List12-52Creator — Creator of documentstringCreator of a document, specified as a string.Description — Description of docume
mlreportgen.dom.CoreProperties class12-53Subject of a document, specified as a string.Tag — Tag for document elementstringTag for document element, s
12 Classes – Alphabetical List12-54mlreportgen.dom.CounterInc classPackage: mlreportgen.domNumber stream counter incrementerDescriptionCreates a numbe
mlreportgen.dom.CounterInc class12-55A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gener
Add Report Content Using Components2-25Next create a chapter for each square by adding a Chapter component to the report as achild of the For Loop co
12 Classes – Alphabetical List12-56See Alsomlreportgen.dom.AutoNumber | mlreportgen.dom.AutoNumberStream |mlreportgen.dom.CounterReset
mlreportgen.dom.CounterReset class12-57mlreportgen.dom.CounterReset classPackage: mlreportgen.domReset numbering stream counterDescriptionReset a num
12 Classes – Alphabetical List12-58A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate
mlreportgen.dom.CounterReset class12-59p.Style = {CounterInc('chapter'),CounterReset('table'),... WhiteSpace('preserve&apo
12 Classes – Alphabetical List12-60mlreportgen.dom.CustomAttribute classPackage: mlreportgen.domCustom element attributeDescriptionCustom element attr
mlreportgen.dom.CustomAttribute class12-61PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element cr
12 Classes – Alphabetical List12-62li = ListItem('Owl');li.CustomAttributes = {CustomAttribute('data-animal-type','bird'
mlreportgen.dom.CustomElement class12-63mlreportgen.dom.CustomElement classPackage: mlreportgen.domCustom element of documentDescriptionUse a custom
12 Classes – Alphabetical List12-64HTML or Microsoft Word must support the custom attributes of this document element.Id — ID for document elementstri
mlreportgen.dom.CustomElement class12-65Method PurposecloneUse CustomElement.clone similar tohow you use Paragraph.clone.Copy custom element.Examples
2 Create Your First Report2-264Save the report.Determine the Matrix SizeNote: This section builds on the previous tasks described in the step-by-step
12 Classes – Alphabetical List12-66mlreportgen.dom.CustomText classPackage: mlreportgen.domPlain text appended to custom elementDescriptionPlain text
mlreportgen.dom.CustomText class12-67A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gener
12 Classes – Alphabetical List12-68mlreportgen.dom.DebugMessage classPackage: mlreportgen.domDebugging messageDescriptionCreates debugging message tex
mlreportgen.dom.DebugMessage class12-69A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gen
12 Classes – Alphabetical List12-70import mlreportgen.dom.*;d = Document('test','html');Create a message dispatcher.dispatcher = M
mlreportgen.dom.Document class12-71mlreportgen.dom.Document classPackage: mlreportgen.domReport definition documentDescriptionCreate mlreportgen.dom.
12 Classes – Alphabetical List12-72Full path of output file or folder for this document. If you do not specify a file extension,the extension is based
mlreportgen.dom.Document class12-73Output ArgumentsdocumentObj — Report definition documentmlreportgen.dom.Document objectReport definition document,
12 Classes – Alphabetical List12-74only, then generating an output file using the same path as an existing output file causesan error.Data Types: logi
mlreportgen.dom.Document class12-75For unzipped packaging, the document output is stored in a folder having the root filename of the OutputPath prope
Add Report Content Using Components2-27Extract the size of each magic square matrix from magicSizeVector using an EvaluateMATLAB Expression component
12 Classes – Alphabetical List12-76Type — Type of output'html' (default) | 'docx' | 'html-file'Type of output, specified
mlreportgen.dom.Document class12-77Method PurposegetOPCMainPart Get full path of main part of outputdocument.moveToNextHole Move to next template hol
12 Classes – Alphabetical List12-78close(d); rptview(d.OutputPath); See Alsomlreportgen.dom.DocumentPart
mlreportgen.dom.DocumentPart class12-79mlreportgen.dom.DocumentPart classPackage: mlreportgen.domDocument partDescriptionThis class defines a form th
12 Classes – Alphabetical List12-80Type of output, specified as 'html', 'docx' or 'html-file'.• 'html'— HTML o
mlreportgen.dom.DocumentPart class12-81PropertiesChildren — Children of this documentcell array of mlreportgen.dom.Element objectsThis read-only prop
12 Classes – Alphabetical List12-82A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, wher
mlreportgen.dom.DocumentPart class12-83Method Purposeappend Append document element to the documentpart.close Close this document part.createTemplate
12 Classes – Alphabetical List12-84mlreportgen.dom.DOCXPageFooter classPackage: mlreportgen.domPage footer definition for Microsoft Word documentDescr
mlreportgen.dom.DOCXPageFooter class12-85• first— footer appears only on the first page of a section• even— footer appears on even pages in a section
2 Create Your First Report2-284Save the report.Insert the Magic Square Size into the ReportNote: This section builds on the previous tasks described i
12 Classes – Alphabetical List12-86This read-only property for a Word document is a mlreportgen.dom.DOCXSectionobject that specifies the properties, a
mlreportgen.dom.DOCXPageFooter class12-87Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is g
12 Classes – Alphabetical List12-88Method Purpose• Text• UnorderedListclose Close footer.fill Fill template hole.moveToNextHole Move to next template
mlreportgen.dom.DOCXPageHeader class12-89mlreportgen.dom.DOCXPageHeader classPackage: mlreportgen.domPage header definition for Microsoft Word docume
12 Classes – Alphabetical List12-90For example, to have a header appear on the first page and on even pages, define twoseparate headers, one with page
mlreportgen.dom.DOCXPageHeader class12-91This read-only property is the type (inline or block) of the current template hole.• An inline hole is for d
12 Classes – Alphabetical List12-92Tag for document element, specified as a string.A session-unique ID is generated as part of document element creati
mlreportgen.dom.DOCXPageHeader class12-93Method Purposeclose Close header.fill Fill template hole.moveToNextHole Move to next template hole.open Open
12 Classes – Alphabetical List12-94mlreportgen.dom.DOCXPageMargins classPackage: mlreportgen.domPage margins for Microsoft Word page layoutDescription
mlreportgen.dom.DOCXPageMargins class12-95• pi — picas• pt — points• px — pixelsFooter — Footer sizestringSpecify the size using the same format used
Add Report Content Using Components2-294In the Library pane, under the MATLAB category, double-click Insert Variable.5In the Properties pane on the r
12 Classes – Alphabetical List12-96Specify your own tag value, for example, to make it easier to identify where an issueoccurred during document gener
mlreportgen.dom.DOCXPageSize class12-97mlreportgen.dom.DOCXPageSize classPackage: mlreportgen.domSize and orientation of pages in Microsoft Word docu
12 Classes – Alphabetical List12-98• pi — picas• pt — points• px — pixelswidth — Width of page'8.5in' (default) | stringThe string must have
mlreportgen.dom.DOCXPageSize class12-99PropertiesHeight — Height of pages in Word page layout sectionstringString specifying the page height. The str
12 Classes – Alphabetical List12-100A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe
mlreportgen.dom.DOCXPageSize class12-101rptview('myreport','docx');• “Report Formatting Approaches”See Alsomlreportgen.dom.DOCXPa
12 Classes – Alphabetical List12-102mlreportgen.dom.DOCXRawFormat classPackage: mlreportgen.domXML markup for array of Microsoft Word formatsDescripti
mlreportgen.dom.DOCXRawFormat class12-103For information about XML markup for Word formats, see http://officeopenxml.com/anatomyofOOXML.php.Tag — Tag
12 Classes – Alphabetical List12-104mlreportgen.dom.DOCXSection classPackage: mlreportgen.domPage format and layout for Microsoft Word document sectio
mlreportgen.dom.DOCXSection class12-105A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gen
vi ContentsAdd Report Content Using Components . . . . . . . . . . . . . . . . . 2-5Report Components . . . . . . . . . . . . . . . . . . . . . . . .
2 Create Your First Report2-30To create the magic square and display the associated matrix or image, use the EvaluateMATLAB Expression component.1In t
12 Classes – Alphabetical List12-106Style — Formats defining section stylearray of format objectsThe formats you specify using this property override
mlreportgen.dom.DOCXSection class12-107p = Paragraph('Hello World');append(d,p);close(d);rptview('mydoc.docx');See Alsomlreportge
12 Classes – Alphabetical List12-108mlreportgen.dom.DOCXSubDoc classPackage: mlreportgen.domReference to external Microsoft Word documentDescriptionRe
mlreportgen.dom.DOCXSubDoc class12-109Path of Word document targeted by this reference, represented by anmlreportgen.dom.DOCXSubDoc object.Properties
12 Classes – Alphabetical List12-110ExamplesAppend a Word Document to a Reportimport mlreportgen.dom.*info = Document('CompanyInfo','do
mlreportgen.dom.ErrorMessage class12-111mlreportgen.dom.ErrorMessage classPackage: mlreportgen.domError messageDescriptionSpecifies error message tex
12 Classes – Alphabetical List12-112A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generat
mlreportgen.dom.ErrorMessage class12-113d = Document('test','html'); dispatcher = MessageDispatcher.getTheDispatcher;l = addl
12 Classes – Alphabetical List12-114mlreportgen.dom.ExternalLink classPackage: mlreportgen.domHyperlink to a location outside of documentDescriptionDe
mlreportgen.dom.ExternalLink class12-115textObj — Text object containing link textmlreportgen.dom.Text objectText object containing link text, specif
Add Report Content Using Components2-31cIn the Evaluate expression if there is an error text box, replace the existingtext with the following:disp([&
12 Classes – Alphabetical List12-116A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe
mlreportgen.dom.FirstLineIndent class12-117mlreportgen.dom.FirstLineIndent classPackage: mlreportgen.domIndent first line of paragraphDescriptionInde
12 Classes – Alphabetical List12-118• pt — points• px — pixelsstyle — Type of indentationstringString specifying the style of indentation of the first
mlreportgen.dom.FirstLineIndent class12-119A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS
12 Classes – Alphabetical List12-120mlreportgen.dom.FlowDirection classPackage: mlreportgen.domDirection of text or table column flowDescriptionSpecif
mlreportgen.dom.FlowDirection class12-121PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element cre
12 Classes – Alphabetical List12-122q = clone(p);q.Style = {FlowDirection('ltr')};append(d,q);close(d);rptview(d.OutputPath,doctype);
mlreportgen.dom.FontFamily class12-123mlreportgen.dom.FontFamily classPackage: mlreportgen.domFont familyDescriptionProperties of font family to be u
12 Classes – Alphabetical List12-124ComplexScriptFamilyName — Font family for complex scriptsstringFor Word documents only. String specifying a font f
mlreportgen.dom.FontSize class12-125mlreportgen.dom.FontSize classPackage: mlreportgen.domFont sizeDescriptionSpecifies the size of a font.Constructi
2 Create Your First Report2-32Add Display LogicNote: This section builds on the previous tasks described in the step-by-step examplesummarized in “Cre
12 Classes – Alphabetical List12-126Font size, represented by an mlreportgen.dom.FontSize object.PropertiesId — ID for document elementstringA session
mlreportgen.dom.FontSize class12-127More About• “Report Formatting Approaches”
12 Classes – Alphabetical List12-128mlreportgen.dom.FormalTable classPackage: mlreportgen.domFormal tableDescriptionDefines a formal table, which is a
mlreportgen.dom.FormalTable class12-129Input Argumentsncols — Number of columns in tablenumeric valueNumber of columns in a table, specified as a num
12 Classes – Alphabetical List12-130• Character array (strings)• One- or two-dimensional cell array• double• mlreportgen.dom.Text object• mlreportgen.
mlreportgen.dom.FormalTable class12-131Output ArgumentsformalTableObj — Formal tablemlreportgen.dom.FormalTable objectFormal table, represented by an
12 Classes – Alphabetical List12-132Border String Description Supported Output Typesdotdash Line with alternating dotsand dashesWorddotdotdash Line wi
mlreportgen.dom.FormalTable class12-133Border String Description Supported Output Typesthinthicklargegap Dashed line withalternating thin and thickda
12 Classes – Alphabetical List12-134• A hexadecimal RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shadeof blue.BorderWidth — Table borde
mlreportgen.dom.FormalTable class12-135ColSepWidth — Width of line separating table columnsstringString having the format valueUnits, where Units is
Add Report Content Using Components2-33magic_Square_Size<=largestDisplayedArrayThis command tests whether the current matrix size (magic_Square_Si
12 Classes – Alphabetical List12-136Footer — Footer for this tablemlreportgen.dom.TableFooter objectThe table constructor creates a table footer objec
mlreportgen.dom.FormalTable class12-137• pi — picas• pt — points• px — pixelsParent — Parent of document elementDOM objectThis read-only property lis
12 Classes – Alphabetical List12-138Style — Format for tablearray of format objectsArray of format objects (such as Bold objects) that specify the for
mlreportgen.dom.FormalTable class12-139• pt — points• px — pixelsTag — Tag for document elementstringTag for document element, specified as a string.
12 Classes – Alphabetical List12-140Method PurposecloneUse FormalTable.clone the same wayyou use Paragraph.clone.Copy the table.See Alsomlreportgen.do
mlreportgen.dom.Group class12-141mlreportgen.dom.Group classPackage: mlreportgen.domGroup of document objectsDescriptionGroup of document objects tha
12 Classes – Alphabetical List12-142PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.
mlreportgen.dom.Group class12-143Related Examples• “Add Content as a Group”• “Create Object Containers”
12 Classes – Alphabetical List12-144mlreportgen.dom.HAlign classPackage: mlreportgen.domSpecify horizontal alignment of document objectDescriptionSpec
mlreportgen.dom.HAlign class12-145A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate
2 Create Your First Report2-347On the Library pane, under Logical and Flow Control, double-click LogicalThen.The then component appears above the else
12 Classes – Alphabetical List12-146mlreportgen.dom.Heading classPackage: mlreportgen.domHeading paragraphDescriptionCreate a heading paragraph.Constr
mlreportgen.dom.Heading class12-147The style specified by styleName must specify a paragraph style defined in the templateused to create the document
12 Classes – Alphabetical List12-148Data Types: logicalColor — Text colorstringSpecify one of these as a string:• The name of a color. The name must b
mlreportgen.dom.Heading class12-149To specify substitutions for this font, do not set this property. Instead create and add amlreportgen.dom.FontFami
12 Classes – Alphabetical List12-150Data Types: logicalOuterLeftMargin — Left margin (indentation) of document elementstringString specifying the left
mlreportgen.dom.Heading class12-151Style — Text formattingarray of mlreportgen.dom.DOCXSection objectsAn array of mlreportgen.dom.DOCXSection objects
12 Classes – Alphabetical List12-152Border String Description Supported Output Typesdotted Dotted line WorddottedHeavy Thick dotted line WorddotDash D
mlreportgen.dom.Heading class12-153Border String Description Supported Output Typesnowrap Sequences of white spacecollapse into a single whitespace.
12 Classes – Alphabetical List12-154Method PurposecloneUse Heading.clone the similar to howyou use Paragraph.clone.Copy heading.See Alsomlreportgen.do
mlreportgen.dom.Height class12-155mlreportgen.dom.Height classPackage: mlreportgen.domHeight of objectDescriptionSpecifies the height of an image.Con
Add Report Content Using Components2-352In the Library pane in the middle, under the MATLAB category, double-click InsertVariable.3In the Properties
12 Classes – Alphabetical List12-156Height of object, represented by an mlreportgen.dom.Height object.PropertiesId — ID for document elementstringA se
mlreportgen.dom.Height class12-157More About• “Report Formatting Approaches”
12 Classes – Alphabetical List12-158mlreportgen.dom.HTML classPackage: mlreportgen.domConvert HTML text to container of DOM objectsDescriptionConverts
mlreportgen.dom.HTML class12-159HTML Element Attributesp class, style, alignpre class, styles class, stylespan class, stylestrike class, stylesub cla
12 Classes – Alphabetical List12-160• border-left-color• border-left-style• boder-left-width• border-right• border-right-color• border-rigtht-style• b
mlreportgen.dom.HTML class12-161• text-decoration• text-indent• vertical-align• white-space• widthFor information about these formats, see the W3Scho
12 Classes – Alphabetical List12-162Parent — Parent of this HTML objecta DOM objectThis read-only property lists the parent of this HTML object.Style
mlreportgen.dom.HTML class12-163rpt = Document('MyRep1','docx');html = HTML('<p><b>Hello</b> <i style=&
12 Classes – Alphabetical List12-164mlreportgen.dom.HTMLFile classPackage: mlreportgen.domConvert contents of HTML file to container of DOM objectsDes
mlreportgen.dom.HTMLFile class12-165HTML Element Attributespre class, styles class, stylespan class, stylestrike class, stylesub class, stylesup clas
2 Create Your First Report2-367In the Library pane, under the Handle Graphics category, double-click FigureSnapshot.8In the Properties pane:aIn the Pa
12 Classes – Alphabetical List12-166• border-left-style• boder-left-width• border-right• border-right-color• border-rigtht-style• border-right-width•
mlreportgen.dom.HTMLFile class12-167• text-indent• vertical-align• white-space• widthFor information about these formats, see the W3Schools CSS docum
12 Classes – Alphabetical List12-168Style — Formatting to apply to HTMLFile objectcell array of format objectsFormatting to apply to the HTMLFile obje
mlreportgen.dom.HTMLFile class12-169rpt = Document('MyHTMLReport','docx');Create the first HTMLFile object and append HTML markup
12 Classes – Alphabetical List12-170mlreportgen.dom.Image classPackage: mlreportgen.domCreate image to be included in reportDescriptionCreate an image
mlreportgen.dom.Image class12-171• .png• .tif• .tiffFor HTML reports, you can use the same image formats as for a Word report, plus youcan use .svg f
12 Classes – Alphabetical List12-172Image.Style = {Height('4in')};Id — ID for document elementstringA session-unique ID is generated as part
mlreportgen.dom.Image class12-173Possible values are:• top• bottom• middleWidth — Image widthstringString having the format valueUnits, where Units i
12 Classes – Alphabetical List12-174Related Examples• “Create and Format Images”
mlreportgen.dom.ImageArea class12-175mlreportgen.dom.ImageArea classPackage: mlreportgen.domDefine image area as hyperlinkDescriptionDefine an area i
Add Report Content Using Components2-37The Outline pane looks like the following.
12 Classes – Alphabetical List12-176Text to display if the image is not visible, specified as a string.x1 — x coordinate of top-left corner of rectang
mlreportgen.dom.ImageArea class12-177The radius, in pixels.Data Types: uint16polygonCoordinates — Coordinates of polygonal image areaarraySpecify an
12 Classes – Alphabetical List12-178• 'circle' — circular image area• 'poly' — polygonal image areaCoords — Coordinates for image
mlreportgen.dom.ImageArea class12-179x = 0:pi/100:2*pi;y = sin(x);plot(x,y);annotation('textbox', [0.2,0.4,0.1,0.1],... 'Str
12 Classes – Alphabetical List12-180mlreportgen.dom.ImageMap classPackage: mlreportgen.domMap of hyperlink areas in imageDescriptionMap of image areas
mlreportgen.dom.ImageMap class12-181A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, wh
12 Classes – Alphabetical List12-182plot1.Map = map;append(map,area1);close(d);rptview(d.OutputPath);• “Create and Format Images”See Alsomlreportgen.d
mlreportgen.dom.InnerMargin class12-183mlreportgen.dom.InnerMargin classPackage: mlreportgen.domMargin between content and bounding boxDescriptionSpe
12 Classes – Alphabetical List12-184• cm — centimeters• in — inches• mm — millimeters• pi — picas• pt — points• px — pixelleft — Left margin sizestrin
mlreportgen.dom.InnerMargin class12-185PropertiesBottom — Size of bottom marginstringString specifying the bottom margin. String must have the format
2 Create Your First Report2-389Save the report.
12 Classes – Alphabetical List12-186A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe
mlreportgen.dom.InternalLink class12-187mlreportgen.dom.InternalLink classPackage: mlreportgen.domHyperlink to a location in same documentDescription
12 Classes – Alphabetical List12-188Name of style to use for the link text.textObj — Text object containing link textmlreportgen.dom.Text objectText o
mlreportgen.dom.InternalLink class12-189Name of link style defined in the template, specified as a string. The style specified bystyleName must be de
12 Classes – Alphabetical List12-190ExamplesAdd Internal Linkimport mlreportgen.dom.*d = Document('mydoc');append(d, InternalLink('bio&
mlreportgen.dom.Italic class12-191mlreportgen.dom.Italic classPackage: mlreportgen.domItalic for text objectDescriptionSpecifies whether text should
12 Classes – Alphabetical List12-192A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generat
mlreportgen.dom.Italic class12-193p.Style = {Italic};append(d,p);t = Text('upright text');t.Style = {Italic(false)};append(p,t);close(d);rp
12 Classes – Alphabetical List12-194mlreportgen.dom.KeepLinesTogether classPackage: mlreportgen.domStart paragraph on new page if necessaryDescription
mlreportgen.dom.KeepLinesTogether class12-195Start paragraph on new page if necessary, represented by anmlreportgen.dom.KeepLinesTogether object.Prop
Generate a Report2-39Generate a ReportNote: This section builds on the step-by-step example presented in “Create a MATLABReport” on page 2-2.To see t
12 Classes – Alphabetical List12-196mlreportgen.dom.KeepWithNext classPackage: mlreportgen.domKeep paragraph on same page as nextDescriptionKeep parag
mlreportgen.dom.KeepWithNext class12-197Output ArgumentskeepWithNextObj — Keep paragraph on same page as nextmlreportgen.dom.keepWithNext objectKeep
12 Classes – Alphabetical List12-198More About• “Report Formatting Approaches”
mlreportgen.dom.LineSpacing class12-199mlreportgen.dom.LineSpacing classPackage: mlreportgen.domSpacing between lines of paragraphDescriptionSpecifie
12 Classes – Alphabetical List12-200• in — inches• mm — millimeters• pi — picas• pt — pointsspacingType — Line spacing typestringType of line spacing,
mlreportgen.dom.LineSpacing class12-201Specify your own tag value, for example, to make it easier to identify where an issueoccurred during document
12 Classes – Alphabetical List12-202mlreportgen.dom.LinkTarget classPackage: mlreportgen.domTarget for internal or external links or image area linksD
mlreportgen.dom.LinkTarget class12-203Link target, represented by an mlreportgen.dom.LinkTarget object.PropertiesCustomAttributes — Custom attributes
12 Classes – Alphabetical List12-204MethodsMethod Purposeappend Append content to link target.cloneUse LinkTarget.clone in a similar wayto how you use
mlreportgen.dom.ListItem class12-205mlreportgen.dom.ListItem classPackage: mlreportgen.domCreate item for ordered or unordered listDescriptionSpecifi
viiSave a Report Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9Save a Setup Under Its Existing Name . . . . . . . . . . .
2 Create Your First Report2-402An image of the etching appears briefly.3Images of two magic square images of sizes 16 and 32 appear briefly.4In the Ou
12 Classes – Alphabetical List12-206• mlreportgen.dom.Paragraph• mlreportgen.dom.Image• mlreportgen.dom.Table• mlreportgen.dom.FormalTable• mlreportge
mlreportgen.dom.ListItem class12-207Format objects that specify the format of a document element.Parent — Parent of document elementDOM objectThis re
12 Classes – Alphabetical List12-208Method PurposecloneUse ListItem.clone the same way youuse Paragraph.clone.Clone a list item.ExamplesCreate List It
mlreportgen.dom.MessageDispatcher class12-209mlreportgen.dom.MessageDispatcher classPackage: mlreportgen.domDOM message dispatcherDescriptionDispatch
12 Classes – Alphabetical List12-210MethodsMethod Purposedispatch Dispatch a document generation statusmessage.getTheDispatcher Get the message dispat
mlreportgen.dom.MessageDispatcher class12-211See Alsomlreportgen.dom.MessageDispatcher.dispatch |mlreportgen.dom.MessageDispatcher.getTheDispatcher |
12 Classes – Alphabetical List12-212mlreportgen.dom.MessageEventData classPackage: mlreportgen.domHolds message triggering message eventDescriptionCon
mlreportgen.dom.MessageEventData class12-213PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element
12 Classes – Alphabetical List12-214 open(d);dispatch(dispatcher, ProgressMessage('starting chapter', d));p = Paragraph('Chapter &a
mlreportgen.dom.MessageFilter class12-215mlreportgen.dom.MessageFilter classPackage: mlreportgen.domFilter to control message dispatcherDescriptionFi
Generate a Report2-41
12 Classes – Alphabetical List12-216• true— Pass progress messages.• false— Block progress messages.Data Types: logicalGlobalFilter — Pass or block al
mlreportgen.dom.OPCPart class12-217mlreportgen.dom.OPCPart classPackage: mlreportgen.domDocument part to include in OPC packageDescriptionDocument pa
12 Classes – Alphabetical List12-218PropertiesContentType — Content type of partstringSpecifies the content type, using a file extension. For a list o
mlreportgen.dom.OPCPart class12-219Id — ID for document elementstringA session-unique ID is generated as part of document element creation. You can s
12 Classes – Alphabetical List12-220File Type File ExtensionIcon .curWindows metafile .emfEncapsulated PostScript .epsGIF image .gifHTML .htmlJPEG ima
mlreportgen.dom.OPCPart class12-221ExamplesAdd a File to an OPC PackageThis code inserts a copy of the data.json file in the data subfolder of the my
12 Classes – Alphabetical List12-222mlreportgen.dom.OrderedList classPackage: mlreportgen.domCreate ordered listDescriptionCreate an ordered (numbered
mlreportgen.dom.OrderedList class12-223• mlreportgen.dom.CustomElement• Horizontal one-dimensional array (for a sublist)To append an ordered list, us
12 Classes – Alphabetical List12-224A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe
mlreportgen.dom.OuterMargin class12-225mlreportgen.dom.OuterMargin classPackage: mlreportgen.domMargin between bounding box and its surroundingsDescr
12 Classes – Alphabetical List12-226• cm — centimeters• in — inches• mm — millimeters• pi — picas• pt — points• px — pixelsleft — Outer left margin si
mlreportgen.dom.OuterMargin class12-227PropertiesBottom — Size of bottom marginstringString specifying the bottom margin. String must have the format
12 Classes – Alphabetical List12-228Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is generat
mlreportgen.dom.OuterMargin class12-229More About• “Report Formatting Approaches”
12 Classes – Alphabetical List12-230mlreportgen.dom.OutlineLevel classPackage: mlreportgen.domLevel of paragraph in outlineDescriptionSpecifies the le
mlreportgen.dom.OutlineLevel class12-231PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element crea
12 Classes – Alphabetical List12-232open(d);dp = DocumentPart(d,'ReportTOC');append(d,dp);Set the OutlineLevel property internally, so that
mlreportgen.dom.PageBreakBefore class12-233mlreportgen.dom.PageBreakBefore classPackage: mlreportgen.domStart paragraph on new pageDescriptionSpecifi
12 Classes – Alphabetical List12-234PropertiesTag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID
mlreportgen.dom.Paragraph class12-235mlreportgen.dom.Paragraph classPackage: mlreportgen.domFormatted block of text (paragraph)DescriptionUse a mlrep
3Set Up a Report• “Report Setups” on page 3-2• “Create a New Setup File” on page 3-4• “Open a Report Setup” on page 3-6• “Close a Report Setup” on pag
12 Classes – Alphabetical List12-236A DOM object to include in a paragraph. You can specify these DOM objects:• mlreportgen.dom.ExternalLink• mlreport
mlreportgen.dom.Paragraph class12-237Specify one of these as a string:• The name of a color. The name must be a CSS color name. See http://www.crockf
12 Classes – Alphabetical List12-238The name of a font family.To specify substitutions for this font, do not set this property. Instead create and add
mlreportgen.dom.Paragraph class12-239String Description Supported Output Typesjustify Align left side of paragraphon left side of page, andright side
12 Classes – Alphabetical List12-240Setting the OuterLeftMargin property adds a correspondingmlreportGen.dom.OuterMargin format object to the Style pr
mlreportgen.dom.Paragraph class12-241• double — Use a double line for strikethrough for Word documentsSetting the Strike property adds a correspondin
12 Classes – Alphabetical List12-242Border String Description Supported Output TypesdashDotDotHeavy Line with heavy dasheswith two dots betweenthe das
mlreportgen.dom.Paragraph class12-243To specify how to handle white space, use one of the following strings.Border String Description Supported Outpu
12 Classes – Alphabetical List12-244Method Purposeclone Copy paragraph.ExamplesAdd ParagraphsAdd a paragraph with text and another with an external li
mlreportgen.dom.ProgressMessage class12-245mlreportgen.dom.ProgressMessage classPackage: mlreportgen.domProgress messageDescriptionCreate a progress
3 Set Up a Report3-2Report SetupsIn this section...“Setup Hierarchy” on page 3-2“Setup Files” on page 3-2“Create a Report Setup” on page 3-3A report s
12 Classes – Alphabetical List12-246PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.
mlreportgen.dom.ProgressMessage class12-247ExamplesCreate a Progress MessageCreate the report document.import mlreportgen.dom.*;d = Document('te
12 Classes – Alphabetical List12-248mlreportgen.dom.RawText classPackage: mlreportgen.domWord XML or HTML markup to insert in documentDescriptionWord
mlreportgen.dom.RawText class12-249Word XML markup or HTML markup, specified as a string. For a Word document, themarkup must be valid Word XML marku
12 Classes – Alphabetical List12-250Parent — Parent of document elementDOM objectThis read-only property lists the parent of this document element.Tag
mlreportgen.dom.RepeatAsHeaderRow class12-251mlreportgen.dom.RepeatAsHeaderRow classPackage: mlreportgen.domRepeat table rowDescriptionSpecifies to r
12 Classes – Alphabetical List12-252Repeat table row, represented by an mlreportgen.dom.RepeatAsHeaderRow object.PropertiesId — ID for document elemen
mlreportgen.dom.RepeatAsHeaderRow class12-253import mlreportgen.dom.*;doctype = 'docx';d = Document('repeatHeader',doctype);
12 Classes – Alphabetical List12-254mlreportgen.dom.ResizeToFitContents classPackage: mlreportgen.domAllow table to resize its columnsDescriptionSpeci
mlreportgen.dom.ResizeToFitContents class12-255PropertiesId — ID for document elementstringA session-unique ID is generated as part of document eleme
Report Setups3-3.rpt. For example, the name of the setup file for a setup named myreport would bemyreport.rpt.Create a Report SetupTo create a report
12 Classes – Alphabetical List12-256table1.entry(1,2).Children(1).Content = 'MathWorks';table1.Style = {ResizeToFitContents(true),Width(&apo
mlreportgen.dom.RowHeight class12-257mlreportgen.dom.RowHeight classPackage: mlreportgen.domHeight of table rowDescriptionSpecifies the height of a t
12 Classes – Alphabetical List12-258heightType — Use specified height or height that is at least specified height'exact' | 'atleast&apo
mlreportgen.dom.RowHeight class12-259String having the format valueUnits, where Units is an abbreviation for the units inwhich the height is expresse
12 Classes – Alphabetical List12-260close(d);rptview('myTableDoc','docx');• “Create and Format Tables”See Alsomlreportgen.dom.Tabl
mlreportgen.dom.RowSep class12-261mlreportgen.dom.RowSep classPackage: mlreportgen.domDraw lines between table rowsDescriptionDraw lines (separators)
12 Classes – Alphabetical List12-262Applies ToStringWord HTML'dotdash' X 'dotdotdash' X 'double' X X'doublewave&a
mlreportgen.dom.RowSep class12-263width — Width of table row separatorstringString specifying the color of the table row separator. String must have
12 Classes – Alphabetical List12-264Style — Line style of table row separatorstringLine style for the row separator. See the description of the style
mlreportgen.dom.RowSep class12-265import mlreportgen.dom.*;doctype = 'html';d = Document('test',doctype);t = Table(magic(5));t.St
3 Set Up a Report3-4Create a New Setup FileIn this section...“Create Setup File Using the Report Explorer” on page 3-4“Create Setup File Programmatica
12 Classes – Alphabetical List12-266mlreportgen.dom.ScaleToFit classPackage: mlreportgen.domScale image to fit pageDescriptionSpecifies whether to sca
mlreportgen.dom.ScaleToFit class12-267A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gene
12 Classes – Alphabetical List12-268mlreportgen.dom.Strike classPackage: mlreportgen.domStrike through textDescriptionSpecifies whether to use a strik
mlreportgen.dom.Strike class12-269PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.
12 Classes – Alphabetical List12-270mlreportgen.dom.Table classPackage: mlreportgen.domCreate tableDescriptionUse an mlreportgen.dom.Table object to d
mlreportgen.dom.Table class12-271• mlreportgen.dom.Paragraph• mlreportgen.dom.Text (CharEntity included)• mlreportgen.dom.Image• mlreportgen.dom.Tabl
12 Classes – Alphabetical List12-272Specify one of the following as a string.Border String Description Supported Output Typesdashed Dashed line Word a
mlreportgen.dom.Table class12-273Border String Description Supported Output Typesthickthinmediumgap Dashed line withalternating thick and thindashes
12 Classes – Alphabetical List12-274BorderColor — Border colorstringYou can specify:• Name of a color. The name must be a CSS color name. See http://w
mlreportgen.dom.Table class12-275You can specify:• Name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.html
Create a New Setup File3-5• “Save a Report Setup” on page 3-9
12 Classes – Alphabetical List12-276FlowDirection — Text flow directionstringString specifying the direction for text to flow.• 'ltr' — flow
mlreportgen.dom.Table class12-277This read-only property lists the parent of this document element.RowSep — Style of lines separating rowsstringThe s
12 Classes – Alphabetical List12-278StyleName — Style in document or document part stylesheetstringName of a style specified in the stylesheet of the
mlreportgen.dom.Table class12-279Cell array of format objects that specify the format for table entries.Tag — Tag for document elementstringTag for d
12 Classes – Alphabetical List12-280Method Purposerow Create a table row.ExamplesCreate a Table import mlreportgen.dom.*; d = Document('m
mlreportgen.dom.TableBody class12-281mlreportgen.dom.TableBody classPackage: mlreportgen.domBody of formal tableDescriptionSpecifies the body of a fo
12 Classes – Alphabetical List12-282ColSepColor — Color of line separating columnsstringYou can specify:• Name of a color. The name must be a CSS colo
mlreportgen.dom.TableBody class12-283RowSepColor — Color of lines separating table rowsstringString specifying one of these values:• The name of a co
12 Classes – Alphabetical List12-284The inner margin is the margin between table cell content and the cell borders.The string must have the format val
mlreportgen.dom.TableBody class12-285See Alsomlreportgen.dom.FormalTable | mlreportgen.dom.Table |mlreportgen.dom.TableEntry | mlreportgen.dom.TableF
3 Set Up a Report3-6Open a Report SetupIn this section...“Opening a Setup on the MATLAB Path” on page 3-6“Opening a Setup Not on the MATLAB Path” on p
12 Classes – Alphabetical List12-286mlreportgen.dom.TableColSpec classPackage: mlreportgen.domFormatting for one or more adjacent table columnsDescrip
mlreportgen.dom.TableColSpec class12-287Span — Number of adjacent table columns to which this document element appliesnumber of adjacent table column
12 Classes – Alphabetical List12-288mlreportgen.dom.TableColSpecGroup classPackage: mlreportgen.domDefine style for group of table columnsDescriptionD
mlreportgen.dom.TableColSpecGroup class12-289Id — ID for document elementstringA session-unique ID is generated as part of document element creation.
12 Classes – Alphabetical List12-290 table = Table(magic(5)); table.ColSpecGroups = grps; close(doc); rptview(doc.OutputPath);• “Creat
mlreportgen.dom.TableEntry class12-291mlreportgen.dom.TableEntry classPackage: mlreportgen.domTable entryDescriptionSpecifies the content and style o
12 Classes – Alphabetical List12-292String containing the text for the table entry.textObj — Text object containing the text for the table entrymlrepo
mlreportgen.dom.TableEntry class12-293Specify one of the following as a string.Border String Description Supported Output Typesdashed Dashed line Wor
12 Classes – Alphabetical List12-294Border String Description Supported Output Typesthickthinmediumgap Dashed line withalternating thick and thindashe
mlreportgen.dom.TableEntry class12-295• Name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.html.• A hexade
Open a Report Setup3-7Opening a Setup Not on the MATLAB PathTip Use the setedit command to obtain a list of all the report setups on the MATLABpath.T
12 Classes – Alphabetical List12-296String specifying the inner margin. String must have the format valueUnits whereUnits is an abbreviation for the u
mlreportgen.dom.TableEntry class12-297A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID,
12 Classes – Alphabetical List12-298mlreportgen.dom.TableFooter classPackage: mlreportgen.domFormal table footerDescriptionSpecifies the content and f
mlreportgen.dom.TableFooter class12-299ColSepColor — Color of line separating columnsstringYou can specify:• Name of a color. The name must be a CSS
12 Classes – Alphabetical List12-300The style of a line separating the rows of a table or table section (header, body, or footer).See the description
mlreportgen.dom.TableFooter class12-301Data Types: charTableEntriesHAlign — Horizontal alignment of table entriescenter (default) | left | rightData
12 Classes – Alphabetical List12-302Tag for document element, specified as a string.A session-unique ID is generated as part of document element creat
mlreportgen.dom.TableHeader class12-303mlreportgen.dom.TableHeader classPackage: mlreportgen.domTable headerDescriptionTable header for labeling colu
12 Classes – Alphabetical List12-304ColSepColor — Color of line separating columnsstringYou can specify:• Name of a color. The name must be a CSS colo
mlreportgen.dom.TableHeader class12-305RowSepColor — Color of lines separating table rowsstringString specifying one of these values:• The name of a
viii ContentsReport Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12Report Generation Preferences . . . . . . . . . . .
3 Set Up a Report3-8Close a Report SetupIn this section...“Close a Setup Using the Report Explorer” on page 3-8“Close a Setup Programmatically” on pag
12 Classes – Alphabetical List12-306Name of a style specified in the stylesheet of the document or document part to which thetable header is appendedT
mlreportgen.dom.TableHeader class12-307Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is gen
12 Classes – Alphabetical List12-308mlreportgen.dom.TableHeaderEntry classPackage: mlreportgen.domEntry in table headerDescriptionSpecifies a table he
mlreportgen.dom.TableHeaderEntry class12-309Border String Description Supported Output Typesdashdotstroked Line with alternatingdiagonal dashes and d
12 Classes – Alphabetical List12-310Border String Description Supported Output Typesthickthinsmallgap Dashed line withalternating thick and thindashes
mlreportgen.dom.TableHeaderEntry class12-311BorderWidth — Table border widthstringString specifying the width of the border. The string must have the
12 Classes – Alphabetical List12-312• no abbreviation — pixels• cm — centimeters• in — inches• mm — millimeters• pi — picas• pt — points• px — pixelsR
mlreportgen.dom.TableHeaderEntry class12-313Specify your own tag value, for example, to make it easier to identify where an issueoccurred during docu
12 Classes – Alphabetical List12-314mlreportgen.dom.TableRow classPackage: mlreportgen.domTable rowDescriptionCreates a table row.ConstructiontableRow
mlreportgen.dom.TableRow class12-315String having the format valueUnits, where Units is an abbreviation for the units inwhich the height is expressed
Save a Report Setup3-9Save a Report SetupIn this section...“Save a Setup Under Its Existing Name” on page 3-9“Save a Setup Under a New Name” on page
12 Classes – Alphabetical List12-316Specify your own tag value, for example, to make it easier to identify where an issueoccurred during document gene
mlreportgen.dom.Template class12-317mlreportgen.dom.Template classPackage: mlreportgen.domCreate document templateDescriptionCreate a template for a
12 Classes – Alphabetical List12-318• 'docx'— Word output• 'html-file'— HTML output consisting of a single file that contains the
mlreportgen.dom.Template class12-319• A block hole can contain a Paragraph, Table, OrderedList, UnorderedList,DocumentPart, and Group.CurrrentDOCXSec
12 Classes – Alphabetical List12-320PackageType — Packaging for files generated from document'zipped' (default) | 'unzipped' | &ap
mlreportgen.dom.Template class12-321TitleBarText — Title for HTML browser title barstringFor HTML documents, this property specifies the text for the
12 Classes – Alphabetical List12-322Method PurposegetImagePrefix Get generated image name prefix for thedocument.getMainPartPath Get relative path of
mlreportgen.dom.Template class12-323• “Create an HTML Template”• “Use Style Sheets”See Alsomlreportgen.dom.Document.createTemplate |mlreportgen.dom.T
12 Classes – Alphabetical List12-324mlreportgen.dom.TemplateHole classPackage: mlreportgen.domHole to append to templateDescriptionHole to append to a
mlreportgen.dom.TemplateHole class12-325determine the purpose of the hole when viewing the template in Microsoft Word (forWord templates) or in a Web
3 Set Up a Report3-10Load Report Setup into MATLAB WorkspaceTo load a setup into the MATLAB workspace without loading it into the Report Explorer,use
12 Classes – Alphabetical List12-326A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generat
mlreportgen.dom.Text class12-327mlreportgen.dom.Text classPackage: mlreportgen.domText objectDescriptionText string to include in a document elementC
12 Classes – Alphabetical List12-328Output ArgumentstextObj — Text stringmlreportgen.dom.Text objectText string, represented by an mlreportgen.dom.Tex
mlreportgen.dom.Text class12-329Content — Text string contained by this document elementstringText string contained by this document element.CustomAt
12 Classes – Alphabetical List12-330• pi — picas• pt — points• px — pixelsId — ID for document elementstringA session-unique ID is generated as part o
mlreportgen.dom.Text class12-331The style specified by styleName must be defined in the template used to create thedocument element to which this tex
12 Classes – Alphabetical List12-332Border String Description Supported Output Typessingle Single line HTML and Wordthick Thick line Wordwave Wavy lin
mlreportgen.dom.Text class12-333Border String Description Supported Output Typespre Preserves white space. Textwraps only on line breaks.Acts like th
12 Classes – Alphabetical List12-334More About• “Report Formatting Approaches”
mlreportgen.dom.Underline class12-335mlreportgen.dom.Underline classPackage: mlreportgen.domDraw line under textDescriptionDraw line under textConstr
Insert Components3-11Insert ComponentsIn this section...“Point-and-Click Method” on page 3-11“Drag-and-Drop Method” on page 3-11“Fix Context Violatio
12 Classes – Alphabetical List12-336Applies ToString DescriptionDOCX HTML'dashed' Dashed underline X 'dashedHeavy' Thick, dashed
mlreportgen.dom.Underline class12-337Data Types: charColor — Color of underlinemlreportgen.dom.Color objectColor of the underline, specified by an ml
12 Classes – Alphabetical List12-338mlreportgen.dom.UnorderedList classPackage: mlreportgen.domUnordered (bulleted) listDescriptionSpecifies an unorde
mlreportgen.dom.UnorderedList class12-339• mlreportgen.dom.Table• mlreportgen.dom.Image• mlreportgen.dom.CustomElement• Horizontal one-dimensional ar
12 Classes – Alphabetical List12-340Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is generat
mlreportgen.dom.UnorderedList class12-341See Alsomlreportgen.dom.ListItem | mlreportgen.dom.OrderedList
12 Classes – Alphabetical List12-342mlreportgen.dom.VAlign classPackage: mlreportgen.domVertical alignment of document objectDescriptionSpecifies vert
mlreportgen.dom.VAlign class12-343A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate
12 Classes – Alphabetical List12-344mlreportgen.dom.VerticalAlign classPackage: mlreportgen.domVertical alignment of textDescriptionSpecifies vertical
mlreportgen.dom.VerticalAlign class12-345A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the g
3 Set Up a Report3-12Set Component PropertiesIn this section...“Edit Component Property Values” on page 3-12“Computed Property Values” on page 3-12Edi
12 Classes – Alphabetical List12-346More About• “Report Formatting Approaches”
mlreportgen.dom.WarningMessage class12-347mlreportgen.dom.WarningMessage classPackage: mlreportgen.domWarning messageDescriptionCreate a warning mess
12 Classes – Alphabetical List12-348PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.
mlreportgen.dom.WarningMessage class12-349ExamplesCreate a Warning Messageimport mlreportgen.dom.*;d = Document('test','html');
12 Classes – Alphabetical List12-350mlreportgen.dom.WhiteSpace classPackage: mlreportgen.domWhite space typeDescriptionPreserves white space and line
mlreportgen.dom.WhiteSpace class12-351String Description'pre' White space is preserved by the browser. Text wraps only online breaks. Acts
12 Classes – Alphabetical List12-352String specifying the white space type.String Description'preserve' Preserves white space and line break
mlreportgen.dom.WhiteSpace class12-353 close(d);rptview('test',doctype);See Alsomlreportgen.dom.TextMore About• “Report Formatting Appr
12 Classes – Alphabetical List12-354mlreportgen.dom.WidowOrphanControl classPackage: mlreportgen.domWidow and orphan handlingDescriptionSpecifies whet
mlreportgen.dom.WidowOrphanControl class12-355PropertiesId — ID for document elementstringA session-unique ID is generated as part of document elemen
Move Components3-13Move ComponentsIn this section...“Point-and-Click Method” on page 3-13“Drag-and-Drop Method” on page 3-14Point-and-Click Method1In
12 Classes – Alphabetical List12-356mlreportgen.dom.Width classPackage: mlreportgen.domObject widthDescriptionSpecifies the width of an object, such a
mlreportgen.dom.Width class12-357Output ArgumentswidthObj — Object widthmlreportgen.dom.Width objectObject width, represented by an mlreportgen.dom.W
12 Classes – Alphabetical List12-358• pt — points• px — pixels• % — percentExamplesSet Width and Other Formats for a Tableimport mlreportgen.dom.*;doc
13Create a Report Program• “Create a Report Program” on page 13-3• “Document Object Model” on page 13-4• “Construct a DOM Object” on page 13-6• “Impor
13 Create a Report Program13-2• “Create and Format Text” on page 13-41• “Create and Format Paragraphs” on page 13-46• “Create and Format Lists” on pag
Create a Report Program13-3Create a Report ProgramThe MATLAB Report Generator includes a set of functions, called the DOM (DocumentObject Model) API,
13 Create a Report Program13-4Document Object ModelThe DOM API creates a representation of a report document in your system's memory.Such a repre
Document Object Model13-5• “Import the DOM API Package” on page 13-7
13 Create a Report Program13-6Construct a DOM ObjectThe DOM API includes a special set of MATLAB functions, called constructors, forcreating DOM objec
Import the DOM API Package13-7Import the DOM API PackageAll DOM class names, and hence constructor names, include the prefixmlreportgen.dom. To avoid
3 Set Up a Report3-14Move Command orButtonEffectMove Right Moves a component down one level in the hierarchy. Thecomponent becomes the child of the si
13 Create a Report Program13-8Get and Set DOM Object PropertiesTo get or set the property of a document object, use dot notation, which involvesappend
Create a Document Object to Hold Content13-9Create a Document Object to Hold ContentEvery report program must create an mlreportgen.dom.Document obje
13 Create a Report Program13-10• “Construct a DOM Object” on page 13-6More About• “Form-Based Reporting” on page 13-28• “Document Object Model” on pag
Add Content to a Report13-11Add Content to a ReportThe DOM append function allows you to add content to documents, paragraphs, tables,and other DOM o
13 Create a Report Program13-12append(d,Table(tableArray)); See AlsoFunctionsmlreportgen.dom.Paragraph.appendRelated Examples• “Construct a DOM Object
Clone a DOM Object13-13Clone a DOM ObjectIf you attempt to append an object more than once to the same object or to append anobject to multiple objec
13 Create a Report Program13-14Add Content as a GroupYou can use a group to include the same content in different parts of a report. The DOMAPI clones
Add Content as a Group13-15p2.Bold = true;append(doc,p1);append(doc,p2);append(doc,disclaimer);close(doc);rptview('groupReport','html&
13 Create a Report Program13-16Stream a ReportThe DOM API supports two modes of appending content to a document:• In-memory — Creates the document ent
Report Packages13-17Report PackagesA Microsoft Word document packages all of its contents, text, images, style sheets, and soon, in a single compress
Delete Components3-15Delete Components1In the Report Explorer, in the Outline pane, select the component that you want todelete.2Delete the component
13 Create a Report Program13-18Close a ReportThe last step in creating a report with the DOM API is to close the report. Closing areport writes out an
Display a Report13-19Display a ReportThe DOM API rptview function allows you to display a generated report in a viewerappropriate to its document typ
13 Create a Report Program13-20Report Formatting ApproachesThe DOM API supports three approaches to formatting document objects in reports:• Style she
Use Style Sheets13-21Use Style SheetsA style is a collection of formats that together define the appearance of a documentobject, such as a paragraph,
13 Create a Report Program13-22Related Examples• “Create a Microsoft Word Template” on page 13-111• “Modify Styles in a Microsoft Word Template” on pa
Use Format Objects13-23Use Format ObjectsA format object is a MATLAB program entity that defines the properties and functionsof a specific type of do
13 Create a Report Program13-24Use Format PropertiesMost DOM objects have a set of properties corresponding to the format options mostcommonly used fo
Format Inheritance13-25Format InheritanceThe DOM API allows you to use both template-based styles and format object-basedstyles (or equivalent format
13 Create a Report Program13-26Create Object ContainersYou can use an mlreportgen.dom.Container object to create an HTML containerobject, such as a di
Create Object Containers13-27Related Examples• “Use Style Sheets” on page 13-21• “Use Format Objects” on page 13-23More About• “Report Formatting App
3 Set Up a Report3-16Deactivate ComponentsYou can deactivate any component in a report setup. Deactivating a component causes itto be skipped during g
13 Create a Report Program13-28Form-Based ReportingThe DOM API supports a form-based approach to report generation. You can useMicrosoft Word or an HT
Fill the Blanks in a Report Form13-29Fill the Blanks in a Report FormNavigate Holes in the FormWhen you create a form template, you associate an ID w
13 Create a Report Program13-30Related Examples• “Use Subforms in a Report” on page 13-31• “Create a Microsoft Word Template” on page 13-111• “Add Hol
Use Subforms in a Report13-31Use Subforms in a ReportA document part is a form that you can add to a document or to another document part.Document pa
13 Create a Report Program13-32More About• “Form-Based Reporting” on page 13-28
Create Document Part Template Libraries13-33Create Document Part Template LibrariesIn this section...“Create a Document Part Template Library in a Mi
13 Create a Report Program13-343On the Word ribbon, select the Insert tab.4Select the content that you have created for the document part template.5On
Create Document Part Template Libraries13-35Otherwise, select mlreportgen from the Category list.8In the Description field, enter a template descript
13 Create a Report Program13-36API. You can modify these templates and add your own templates by editing this file,using the markup conventions.You ca
Create Document Part Template Libraries13-37• “Create a Microsoft Word Template” on page 13-111• “Add Holes in a Microsoft Word Template” on page 13-
Send Components to the MATLAB Workspace3-17Send Components to the MATLAB WorkspaceYou can send the components of a setup from the Report Explorer to
13 Create a Report Program13-38Object-Oriented Report CreationNote: This section assumes that you are familiar with object-oriented programming inMATL
Simplify Filling in Forms13-39Simplify Filling in FormsThe object-oriented approach allows you to exploit the DOM fill method to simplifyform-based r
13 Create a Report Program13-40Related Examples• “Use Subforms in a Report” on page 13-31• “Fill the Blanks in a Report Form” on page 13-29• “Create a
Create and Format Text13-41Create and Format TextIn this section...“Create Text” on page 13-41“Create Special Characters” on page 13-41“Append HTML o
13 Create a Report Program13-42p = Paragraph(CharEntity('pound'));append(d,p);append(p,'3');close(d);rptview('test',&apo
Create and Format Text13-43fontFamily = FontFamily('Arial');fontFamily.BackupFamilyNames = {'Helvetica'};t.Style = {fontFamily};t
13 Create a Report Program13-441Open the Word template used with the report.2Open the Styles pane.3Click the Manage Styles button .4Click New Style.5
Create and Format Text13-45if passed status = 'Passed'; statusStyle = 'Pass';else status = 'Failed'; statusStyle =
13 Create a Report Program13-46Create and Format ParagraphsIn this section...“Create a Paragraph” on page 13-46“Create a Heading” on page 13-46“Format
Create and Format Paragraphs13-47Format a ParagraphYou can format a paragraph programmatically, using DOM format objects or formatproperties. You can
ixDisplay Property Name/Property Value Pairs . . . . . . . . . . . . 5-9Edit Table Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13 Create a Report Program13-48Formatting Format Object Format PropertyEast Asian font FontFamily n/aFont size FontSize FontSizeForeground color Color
Create and Format Paragraphs13-49Formatting Format Object Format PropertyKeep paragraph on samepageKeepLinesTogether n/aEliminate widows andorphansWi
13 Create a Report Program13-50}For more information about using HTML styles with DOM objects, see “Modify Styles inan HTML Template” on page 13-127.A
Create and Format Paragraphs13-51append(rpt, p);close(rpt);rptview(rpt.OutputPath);See AlsoClassesmlreportgen.dom.Bold | mlreportgen.dom.FontFamily |
13 Create a Report Program13-52Create and Format ListsIn this section...“Create an Unordered List” on page 13-52“Create an Ordered List” on page 13-53
Create and Format Lists13-53close(d);rptview('myListReport','html');You can also create an unordered list from an array by includ
13 Create a Report Program13-54• Creating an ordered list from a cell array allows you to include items of differenttypes in the list.• Creating a lis
Create and Format Lists13-55Create a Multilevel ListA multilevel list is an ordered or unordered list whose list items contain ordered orunordered li
13 Create a Report Program13-56d = Document('orderedListReport','html');ol = OrderedList({'Start MATLAB', ... '
Create and Format Lists13-57Create a Word List StyleTo define a list style in a Word template, select List as the style type in the CreateNew Style f
4Generate a Report• “Generate a Report” on page 4-2• “Select Report Generation Options” on page 4-4• “Report Generation Preferences” on page 4-13• “Ch
13 Create a Report Program13-58Create and Format TablesIn this section...“Two Types of Tables” on page 13-58“Create a Table from a Two-Dimensional Arr
Create and Format Tables13-59Create a Table from a Two-Dimensional ArrayYou can create a table by appending a two-dimensional numeric array or a cell
13 Create a Report Program13-60table = Table(a);text = table.entry(i(i1),i1).Children(1);text.Color = 'red';append(doc,table);close(doc);rpt
Create and Format Tables13-61close(doc);rptview(doc.OutputPath);Format a TableYou can format a table programmatically, using DOM format objects or fo
13 Create a Report Program13-62Formatting Format Object Format PropertyColor of border Border BorderColorThickness of border Border BorderWidthCreate
Create and Format Tables13-63Formatting Table Object PropertyAlign entries horizontally (left, right,center)TableEntriesValignCreate space (padding)
13 Create a Report Program13-64 append(rpt, ca); close(rpt);rptview(rpt.OutputPath);Format a Table Using Microsoft Word Style SheetsYou can format tab
Create and Format Tables13-65 font-family: Arial, Helvetica, sans-serif; font-size: 11pt; text-align: center;}Apply a Table Style to a TableOnce y
13 Create a Report Program13-66Create a Formal TableTo create a formal table, use the same basic approaches as with an informal table, exceptthat you
Create and Format Tables13-67as a whole. Not all formal table formats apply to formal table sections. For example, youcannot indent a header, body, o
4 Generate a Report4-2Generate a ReportIn this section...“Run a Report” on page 4-2“Report Output Options” on page 4-2Run a ReportYou can generate a M
13 Create a Report Program13-68row = TableRow();append(row,TableEntry('data11'));append(row,TableEntry('data12'));append(table,row
Create and Format Tables13-69table = Table(magic(rank));table.Border = 'single';table.BorderWidth = '1px';grps(1) = TableColSpecG
13 Create a Report Program13-70• Image• Table• OrderedList• UnorderedList• CustomElementFormat Table Entries ProgrammaticallyYou can use format object
Create and Format Tables13-71t.TableEntriesStyle(Border('solid','black','1 px'));Properties you set for a TableEntry ob
13 Create a Report Program13-72More About• “Report Formatting Approaches” on page 13-20
Create Links13-73Create LinksIn this section...“Links” on page 13-73“Create a Link Target” on page 13-73“Create an External Link” on page 13-74“Creat
13 Create a Report Program13-74Create an External LinkUse an mlreportgen.dom.ExternalLink object to create an external link, specifyingthe link target
Create Links13-75Related Examples• “Create Image Maps” on page 13-85• “Add Content to a Report” on page 13-11More About• “Report Formatting Approache
13 Create a Report Program13-76Create and Format ImagesIn this section...“Create an Image” on page 13-76“Resize an Image” on page 13-77“Image Storage”
Create and Format Images13-77close(d);rptview(d.OutputPath);For a list of supported image formats, see mlreportgen.dom.Image.Resize an ImageTo resize
Generate a Report4-3• “Create a Report Log File” on page 4-21• “Report Description” on page 4-12• “Change Report Locale” on page 4-17
13 Create a Report Program13-78Create a Table of ContentsIn this section...“Create a Microsoft Word Table of Contents” on page 13-78“Create an HTML Ta
Create a Table of Contents13-795Select a TOC format option to generate a table of contents. For example, select theBuilt-In format option. The TOC ap
13 Create a Report Program13-80However, if you open a newly generated report yourself in Word, without first usingrptview, perform these steps to get
Create a Table of Contents13-81Create an HTML TOC PlaceholderAn HTML TOC placeholder element is an HTML div element with an id attribute set totoc.&l
13 Create a Report Program13-82toc = CustomElement('div');toc.CustomAttributes = {CustomAttribute('id', 'toc')};append(t
Create a Table of Contents13-83Use Template-Defined Styles to Set Outline LevelsYou can use styles defined in the report’s template to set the outlin
13 Create a Report Program13-84object alone or in combination with template-based styles or format object-based styles.This example assumes that the t
Create Image Maps13-85Create Image MapsYou can specify areas of an image to be links. Clicking the link area in an image in anHTML browser opens the
13 Create a Report Program13-86close(d);rptview(d.OutputPath);See AlsoClassesmlreportgen.dom.Image | mlreportgen.dom.ImageArea |mlreportgen.dom.ImageM
Automatically Number Document Content13-87Automatically Number Document ContentIn this section...“Automatically Number Content Programmatically” on p
4 Generate a Report4-4Select Report Generation OptionsIn this section...“Report Options Dialog Box” on page 4-4“Report Output Format” on page 4-5“PDF
13 Create a Report Program13-882Append the AutoNumber to a Text, Paragraph, or Heading object that contains thetext that precedes the automatic number
Automatically Number Document Content13-89 chapHead.Style = {CounterInc('chapter'), ... CounterReset('table&ap
13 Create a Report Program13-90import mlreportgen.dom.*d = Document('MyReport','docx','MyReportTemplate');for rank = 3:5
Appending HTML to DOM Reports13-91Appending HTML to DOM ReportsIn this section...“Why Append HTML to a DOM Report?” on page 13-91“Workflow for Append
13 Create a Report Program13-92The HTML content that you append must be XML parsable. For a summary of thoserequirements and for a list of supported H
Append HTML Content to DOM Reports13-93Append HTML Content to DOM ReportsIn this section...“Use an addHTML Method” on page 13-93“Append an HTML Objec
13 Create a Report Program13-94Append an HTML ObjectYou can create an mlreportgen.dom.HTML object and append it to a DOM report. Toappend the content
Append HTML File Contents to DOM Reports13-95Append HTML File Contents to DOM ReportsIn this section...“Use an addHTMLFile Method” on page 13-95“Appe
13 Create a Report Program13-96For example, you can convert the contents of two HTML files to a DOM report in Wordformat. This example assumes that th
Use an HTML Cleanup Program13-97Use an HTML Cleanup ProgramYou can use an HTML cleanup program such as HTML Tidy to fix many issues andto identify is
Select Report Generation Options4-5To set defaults for report generation options that you can override with the ReportOptions dialog box or with indi
13 Create a Report Program13-98 <td>Carlos Martinez</td> <td>38</td> <td>Lawyer</td> </tr></ta
Use an HTML Cleanup Program13-99Parsing HTML text: "simple_html_example.html" caused error: "HTML error: "expected end of tag &ap
13 Create a Report Program13-100• “Append HTML File Contents to DOM Reports” on page 13-95More About• “HTML Code Requirements for DOM Reports” on page
HTML Code Requirements for DOM Reports13-101HTML Code Requirements for DOM ReportsIn this section...“XML-Parsable HTML Code” on page 13-101“Supported
13 Create a Report Program13-102HTML Element Attributesbr n/adel class, stylefont class, style, color, face, sizeh1, h2, h3, h4,h5, h6class, style, al
HTML Code Requirements for DOM Reports13-103For information about these elements, see the W3Schools tags documentation atwww.w3schools.com/tags.Suppo
13 Create a Report Program13-104• font-style• font-weight• height• line-height• margin• margin-bottom• margin-left• margin-right• margin-top• padding•
HTML Code Requirements for DOM Reports13-105• The numeric character entity reference &003c;For more information, see http://en.wikipedia.org/wiki
13 Create a Report Program13-106Display Report Generation MessagesIn this section...“Report Generation Messages” on page 13-106“Display DOM Default Me
Display Report Generation Messages13-1072Use the MessageDispatcher.Filter property to specify to display debugmessages.dispatcher.Filter.DebugMessage
4 Generate a Report4-6File Format Using Report TemplatesTo use a template for report generation, select one of these options:• PDF (from template)• HT
13 Create a Report Program13-1081Create a message dispatcher.dispatcher = MessageDispatcher.getTheDispatcher;2Add a listener using the MATLAB addliste
Display Report Generation Messages13-109See AlsoFunctionsmlreportgen.dom.MessageDispatcher.dispatch |mlreportgen.dom.MessageDispatcher.getTheDispatch
13 Create a Report Program13-110Compile a Report ProgramIf the MATLAB Compiler™ product is installed on your system, you can use it to compileyour DOM
Create a Microsoft Word Template13-111Create a Microsoft Word TemplateUse one of these approaches to create a Word template for generating a report.•
13 Create a Report Program13-112Add Holes in a Microsoft Word TemplateIn this section...“Display the Developer Ribbon in Word” on page 13-112“Inline a
Add Holes in a Microsoft Word Template13-1132On the Word ribbon, select the Developer tab.3Click Design Mode to see the hole marks with the title tag
13 Create a Report Program13-114Set Default Text Style for a HoleYour template can specify the name of a default style to use to format Text andParagr
Add Holes in a Microsoft Word Template13-11512In the Create New Building Block dialog box, set Name to the part template name(for example, rgChapter)
13 Create a Report Program13-116Related Examples• “Modify Styles in a Microsoft Word Template” on page 13-117• “Create an HTML Template” on page 13-12
Modify Styles in a Microsoft Word Template13-117Modify Styles in a Microsoft Word TemplateIn this section...“Edit Styles in a Word Template” on page
Select Report Generation Options4-7Viewer Format Description StylesheetsDocBook DocBook (notransform)Produce a report inDocBook formatN/ATip To creat
13 Create a Report Program13-1183In the Manage Styles dialog box, click Modify. The Modify Style dialog box appears.4In the Modify Style dialog box, c
Modify Styles in a Microsoft Word Template13-1192In the Style dialog box, click the Manage Styles button.
13 Create a Report Program13-1203If applicable, select an existing style to use as a starting point for the new style.4Click the New Style button.
Modify Styles in a Microsoft Word Template13-1215Specify a name for the new style and define the style characteristics. To save the newstyle definiti
13 Create a Report Program13-122Create an HTML TemplateUse one of these approaches to create an HTML template for generating a report.• Use mlreportge
Create an HTML Template13-123• “Create a Microsoft Word Template” on page 13-111
13 Create a Report Program13-124Add Holes in an HTML TemplateIn this section...“Inline and Block Holes” on page 13-124“Create an Inline Hole” on page
Add Holes in an HTML Template13-125Replace STYLE_NAME with the name of a default text (HTML span element) style touse for formatting Text objects app
13 Create a Report Program13-1265Zip the template using the zipTemplate command.See AlsoFunctionsunzipTemplate | zipTemplateRelated Examples• “Modify
Modify Styles in an HTML Template13-127Modify Styles in an HTML TemplateYou can customize or add format styles in a custom HTML template.1In a text o
4 Generate a Report4-8Note: Some Web and Print stylesheets include an automatically generated list of titles,which includes table titles and figures w
13 Create a Report Program13-128Create Microsoft Word Page Layout SectionsIn this section...“Define Page Layouts in a Template” on page 13-128“Navigat
Create Microsoft Word Page Layout Sections13-129rpt = Document('test','docx');open(rpt);sect = rpt.CurrentDOCXSection;pageSize =
13 Create a Report Program13-130table = append(rpt,magic(22));table.Border = 'solid';table.ColSep = 'solid';table.RowSep = 's
Create Page Footers and Headers13-131Create Page Footers and HeadersIn this section...“Create Page Headers and Footers in a Template” on page 13-131“
13 Create a Report Program13-132template-defined headers and footers for the current section of a document or documentpart.The value of the CurrentDOC
Create Page Footers and Headers13-133 switch firstPageHeader.CurrentHoleId case 'Date' append(
13 Create a Report Program13-134pageHeaders(1) = DOCXPageHeader('first',d,'FirstPageHeader');while ~strcmp(pageHeaders(1).CurrentH
Select Report Generation Options4-9Web Stylesheet DescriptionTruth Table HTMLstylesheetHTML on multiple pages; suppresses chapter headingsand table o
Kommentare zu diesen Handbüchern