REPORT element - Intergraph Smart 3D - Help - Hexagon

Intergraph Smart 3D Isogen Isometric Drawings

Language
English
Product
Intergraph Smart 3D
Subproduct
Drawings and Reports
Search by Category
Help
Smart 3D Version
13.1
Isogen Version
13.0(2016)

Defines the content and format of the report output.

Basic syntax:

<REPORT Name='S1'>
Filter="Type='Spool-Summary'"
OutputType="Excel"
UniqueColumn="Spool-ID"
OnDuplicate="DeleteExisting" Path="<folder>\SpoolgenPlusSpools.xlsx"
Table="Spools">
</REPORT>

The REPORT element contains three mandatory attributes:

  • Name specifies the name of the report. Isogen uses this attribute only for internal indexing.

    Name="R01"

  • Path specifies the output file to populate. If the path does not exist, it is created it during processing.

    To create a file with the name of the POD file being processed, name the file $POD$ (one Excel file for each POD file. If you specify a fixed file name, all data from each POD file is appended to the same file.

    Path = 'c:\temp\$POD$.xlsx

  • Table specifies the name of the worksheet to be populated in an Excel file. If the worksheet does not exist, it is created during processing.

    If the table exists and is populated, data is written only to columns that already exist in the table. The column header in the table must match the column name in the Table element.

Optionally, you can also specify the following attributes:

  • Filter defines which rows from the table are displayed. A filter expression refers to one or more column names, as defined in the COLUMN elements. Rows where Filter is TRUE are included in the data output to the drawing. If this attribute is not defined, all rows from the table display.

  • The Filter attribute is a string that can contain any of the following items.

    • Column names

    • Boolean operators AND, OR, or NOT

    • Brackets to group clauses ()

    • Comparison Operators < > <= >= <> = LIKE

    • Mathematical Operators + - / *

    • Wildcards * or %

    • Functions CONVERT, LEN, ISNULL, IF, TRIM, SUBSTRING

  • If the filter contains strings, use the single quote character for the string constant and the double quote character for the Filter expression.

Filter="SKEY=’TML0’"
Filter="C105 LIKE ‘product*’ AND C106 < C107"

  • If column names contain spaces, enclose the column name in brackets [ ].

Filter="[Iso Number] = ‘AAAA’"

  • Sort defines the order of rows in the view. A Sort expression refers to one or more column names. The keywords ascending (ASC) and descending (DESC) indicate whether data is sorted into ASCending or DESCending order. This attribute is optional. When the Sort expression is not used, the rows are in the same order as the table defined in the POD file.

    Sort=’C105 ASC’
    Sort=’C105 ASC C102 DESC’

    If the column names contain spaces, enclose the column name in brackets [ ].

    Sort="[Iso Number] ASC"

  • OutputType specifies the report format.

    • Excel saves the report to an Excel spreadsheet. This is the default setting.

    • CSV saves the report to a comma-delimited file.

    • Text generates a text report in delimited or fixed column format. When OutputType is set to Text, the default output is a delimited file with no delimiters.

  • ReportMode controls how the processor handles pre-existing output reports.

    • OverWrite deletes the specified output file if it already exists and replaces it with the new version. This is the default setting for all reports. In OverWrite mode, Isogen ignores the UniqueColumn and OnDuplicate settings.

    • Update adds new data to the existing file. Data is added only to fields that already exist. Update mode is applicable only if OutputType is set to Excel or CSV. This setting works in conjunction with the UniqueColumn and OnDuplicate settings.

    • Append appends data to the end of the report with no regard to the existing data. Append mode is applicable only if OutputType is set to Text. This setting ignores the UniqueColumns and OnDuplicate attributes. If either of those attributes is defined, the software generates a message similar to the following:

      Warning: OnDuplicate is not a valid attribute when OuputType=Text and will be ignored.

  • UniqueColumn indicates the name of the column that contains a unique value in each row, such as a spool ID in a table of spools or a weld number in a table of welds. This setting controls how the Isogen behaves when it encounters data that already exists in the report. UniqueColumn works in conjunction with OnDuplicate.

  • OnDuplicate controls how the processor handles duplicate values.

    • DeleteExisting deletes the existing row that meets the criteria specified by UniqueColumn. New values are appended to the end of the table.

    • LeaveExisting appends new values to the end of the table.

  • ReportType specifies what Isogen reports as the type of report. Setting this attribute overrides the default type (REPORT) returned by Isogen. This is a user-specified value. For example, setting ReportType to MatControl returns the string "MatControl" in the list of Isogen outputs (instead of the default "REPORT" value).

    You cannot set ReportType for FIX or HGG output. By default, these output types return FABRICATION-INTERFACE and HGG-INTERFACE, respectively.

  • Separator creates delimited text output. The value can be any text string. Isogen outputs the text sting for each column except the last. In the example, Separator is set to ; (semicolon).

    01532837 ; 24850-SPL ; '00526 ; 526400046 ; UWR3-JW-60001-1-1 ; 5 ; LWB040010S..GR04......... ; 2
    01532838 ; 24851-SPL ; '00526 ; 526400046 ; UWR3-JW-60001-1-2 ; 12 ; LVS007540S..GR04......... ; 2
    01532838 ; 24851-SPL ; '00526 ; 526400046 ; UWR3-JW-60001-1-2 ; 6 ; LWB040010S..GR04......... ; 2

    If both Separator and Start attributes are defined, the Separator is appended to the data, and the Start column is respected.

When OutputType is set to Text, the REPORT element can also contain multiple child HEADER entries. A HEADER entry can contain fixed text strings as well as macros.

<REPORT>
<HEADER>
<![CDATA[This is header text to be output to the file unchanged. You can include a table column name between$...$ or '...' (for example, to
indicate values from a parent table. For example, Isogen will substitute $Line#$ or 'Line#' with the Line# value in the first row of the Report
table.]]>
</HEADER>
</REPORT>

  • If there are multiple HEADER entries, Isogen outputs them in the order in which they appear in the configuration file.

  • Isogen outputs HEADER text before any field data from the parent table.

Controlling output and the order of report fields

The REPORT element supports child COLUMN entries. You can use these COLUMN entries to control the order, start position, the maximum number of characters, and the justification of the table output.

Basic syntax:

<REPORT ...>
<COLUMN Name="A" Start="100" MaxChars="20" Justification="Left" />
<COLUMN Name="B" Start="140" MaxChars="20" Justification="Left" />
</REPORT>

The child COLUMN entry contains the following attributes:

  • Name specifies the name of a column in the REPORT table or GroubByTable. The value must match one of the column entries.

    Name="Line ID"

  • Start specifies the start position in the line of data to output in the report. Specify a value of 1 or greater. The following syntax starts the output in column 10 of the line of data.

    Start="10"

    To specify a start position relative to the previous column, prepend the value with a plus (+) sign. For example, the following syntax starts the output 20 characters to the right of the previous column:

    Start="+10"

  • MaxChars specifies the number of characters allowed for the data. Specify a value of 1 or greater.

    MaxChars="3"

  • Justification specifies the justification of data output to a fixed width text file. Supported values are Left (default value), Right, and Numeric (applies only to real numbers).

    Justification="Right"

If the REPORT element does not contain any COLUMN entries, the output report contains all the columns in the order defined in the parent TABLE element or GROUPBYTABLE element. This is the default behavior.

Table Format

REPORT definition

Isogen Output

<REPORT>
</REPORT>


However, if the REPORT element does contain COLUMN entries, these entries override the default order.

Table Format

REPORT definition

Isogen Output

<REPORT>
<COLUMN Name="B"
<COLUMN Name="A">
</REPORT>


Additionally, if the COLUMN list contains any Start attributes, these also override the default order:

  • Any COLUMN entry with a Start attribute is sorted by the Start attribute.

  • Any COLUMN entry without a Start attribute is ignored.

Table Format

REPORT definition

Isogen Output

<REPORT>
<COLUMN Name="B">
<COLUMN Name="A" Start="20">
<COLUMN Name="C" Start="10">
<COLUMN Name="D">
</REPORT>

  • The REPORT/COLUMN entry can also include a single child FORMAT element to control unit conversion and number formatting.

  • When the Type attribute for a TABLE/COLUMN entry is set to CharacteristicBore, Isogen Reporting supports multiple FORMAT elements in the corresponding REPORT/COLUMN entry. See Use Case 2 in FORMAT element.