List

Create bulleted or numbered list from cell array or child components

Description

This component creates a bulleted or numbered list from a cell array or child components.

List Content

  • Create list from workspace cell array: Creates the list from of the 1-by-n or n-by-1 cell array. This option is not available when this component has child components — in this case, the list automatically generates from the child components.

  • List title: Specifies the title of the list.

  • List title style name: Specifies the style to use with the list title. To specify a style, perform these steps.

    1. In the Report Options dialog box, set File format to one of these values:

      • Word (from template)

      • HTML (from template)

      • PDF (from template)

    2. In the List properties dialog box, set List title style name to Specify.

    3. In the List title style name text box, type a style name.

      To take effect, the style you specify must be a list style defined in the template that you use to generate the report. For more information about template styles, see Create Custom Microsoft Word Report Templates and Create Custom HTML Report Templates.

List Formatting

  • List style:

    • Bulleted list

    • Numbered list.

  • Numbering style: Specifies a numbering style for numbered lists. This setting is supported only in the RTF/DOC report format. Options include:

    • 1,2,3,4,...

    • a,b,c,d,...

    • A,B,C,D,...

    • i,ii,iii,iv,...

    • I,II,III,IV,...

  • List style name: Specifies the style to use with the list. To specify a style, perform these steps.

    1. In the Report Options dialog box, set File format to one of these values:

      • Word (from template)

      • HTML (from template)

      • PDF (from template)

    2. Set List style name to Specify.

    3. In the List style name text box, type a style name.

      To take effect, the style you specify must be defined in the template that you use to generate the report.

  • Show parent number in nested list (1.1.a): Displays all level numbers in a nested list. You can create a nested list by putting one cell array inside another or by nesting one List component inside another. Following is an example of how a list appears when you select this option:

    1. Example
    2. Example
    	2.1. Example
    	2.2. Example
    		2.2.a. Example
    		2.2.b. Example
    3. Example
    

    This option is not available if you select Show only current list value (a).

  • Show only current list value (a): Displays only the current list value. Following is an example of how a list appears when you select this option:

    1. Example
    2. Example
    	1. Example
    	2. Example
    		1. Example
    		2. Example
    3. Example
    

    This option is not available if you select Show parent number in nested list (1.1.a).

Example 1: Creating a Nested List

Consider the following report setup file, which includes a nested list created by putting a List component inside another List component:

[-] Report - Unnamed.rpt
   [-] Bulleted list from child components
      [ ] Text - sky
      [ ] Table - varname
      [ ] Image - test.jpg
      [ ] Text - grass
      [-] Bulleted list from child components
         [ ] Text - clouds
         [ ] Text - sun
      [-] Paragraph - information

This report setup file generates a report that includes the following bulleted lists:

  • sky

  • varname, the table from the variable

  • test.jpg, a snapshot of the image

  • grass

    • clouds

    • sun

  • information

Example 2: Creating a List Using Child Components

To generate a report that includes the following bulleted list:

  • red

  • green

  • blue

Use the following report setup file:

[-] Report - Unnamed.rpt
   [-] Bulleted list from child components
      [ ] Text - red
      [ ] Text - green
      [ ] Text - blue

Creating a List Using a Cell Array

To generate the same bulleted list as in the previous example, configure a report setup file to call a cell array, colors:

[-] Report - Unnamed.rpt
   [-] Bulleted list from cell array called colors

Wherecolors is:

colors={'red','green','blue'}

Insert Anything into Report?

Yes. List.

Class

rptgen.cfr_list

Was this topic helpful?