The REPORT Command

The Report command object is identified with the REPORT command in the Edit window.

The REPORT Command Syntax

A REPORT command has the following syntax in the Edit window in Command mode:

<ID>        =REPORT/<TOG1>, FILENAME= <PATHWAY>, AUTOPRINT=<TOG2>, INLINE REPORT=<TOG3>, Section=<NUM1>,REPORTMODE=<MODE>

            PARAM/=

            ENDREPORT/

<ID>
This is the ID for the REPORT command.

REPORT/<TOG1>
This changes the type of REPORT command. It can be CUSTOM, LEGACY, TEMPLATE, or LABEL.

FILNAME=<PATHWAY>
This determines the report or template to load. <PATHWAY> is the full file name path that points to the desired file. If you only use the name of the report or template, PC-DMIS looks in the default Reporting directory.

AUTOPRINT =<TOG2>
<TOG2> can switch between PRINT and PDF and NO. It only applies to REPORT/LEGACY commands.

Setting AUTOPRINT=PRINT prints the HyperView report to the default printer after it loads and executes. The report closes immediately after the print job has spooled and execution of the measurement routine resumes.

Setting AUTOPRINT=PDF prints the HyperView Report to a Portable Document Format (PDF) file. The following rules apply:

Setting AUTOPRINT=NO does not print anything during execution of this command.

INLINE REPORT=<TOG3>
This is only used with Legacy (HyperView) Reports that have AUTOPRINT set to PDF. It determines if HyperView report information appears in line with the other generated data from the Report window in a PDF output.

<TOG3> switches between ON and OFF.

ON - When this command executes, and the Output Configuration dialog box generates a PDF automatically by the Overwrite, Auto, or Append options, the data from the specified legacy (HyperView) report appears in line with the other normal report output in the PDF file.

If the Prompt option is used, and this is set to ON, then multiple PDFs are generated, one for the HyperView report and additional PDFs as needed to cover the rest of the Report window's content.

OFF - Data from the HyperView report appears in its own PDF file based off the name of the HyperView report. It is not included in the PDF generated from the Output Configuration dialog box.

Be aware that this option overrides the AUTOPRINT option for HyperView commands.

For more information on legacy HyperView reports, see "Working with Legacy (HyperView) Reports".

Section=<NUM>
<NUM> determines the section into which the report or template is inserted. This item does NOT apply to label templates.

If you type -1 or a value greater than the number of sections in the default template, the report gets inserted at the end.

REPORTMODE=<MODE>
When a measurement routine executes and a default report template is specified, it starts to generate the report using the default report template. Once it reaches the REPORT command, the generation changes based on the specified report mode:

<MODE> - This can either be SWITCH or INSERT. This mode only applies to the REPORT/TEMPLATE commands.

SWITCH - This switches the report template to use the one in this command until another REPORT command is encountered or until the end of the measurement routine.

INSERT - This generates report data for previously-executed commands. It uses the template in this command. When this REPORT command finishes, PC-DMIS returns to using the default report template to generate the rest of the report data.

PARAM/
The PARAM/ option allows you to map PC-DMIS expressions to a report or a report template's variables or properties. This option does not apply to REPORT/LABEL commands.

The syntax of the PARAM/ option is:

PARAM/{object or variable name}={PC-DMIS expression}

If you have a Global Variable in a report named NumBoltHoles. The following PARAM/ option would map the PC-DMIS expression to NumBoltHoles:
PARAM/NumBoltHoles=360.0/angle

Changes to the variable in the editor can also change the PC-DMIS variable.

Using the following PARAM/ option, the variable NumBoltHoles is set equal to the variable numBolts. Any changes within the HyperView report to the HyperView variable NumBoltHoles are reflected in the PC-DMIS variable numBolts:
PARAM/NumBoltHoles=numBolts

After execution, any objects you changed by passing parameters into a Report template or a HyperView report revert to what they had been before execution if you redraw or modify the report in any way. This means if you want to retain the results of passing a parameter to your template or report, you need to first print the report before you make modifications. You can do this using the AUTOPRINT parameter or by printing directly from the Report window.

See "Using the PARAM command to Map PC-DMIS Expressions to Object Properties" for additional information on using parameters.

You can press F9 on a REPORT/CUSTOM command to open the custom report in the Custom Report Editor.

REPORT/TEMPLATE Report Generation

PC-DMIS generates the default report as usual until it reaches this command. When it executes this command, PC-DMIS utilizes the specified template and generates a separate report for all the measurement routine commands in a new section within the current report. After PC-DMIS generates this new report section, it switches back to the previous report and continues to generate commands in the original report from that point forward.

Related Topics:

Using the PARAM command to Map PC-DMIS Expressions to Object Properties

Using Forms with Reports