Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

PMLReport Object

  • Last UpdatedSep 09, 2025
  • 3 minute read

This object is used to run new reports created by the designer in batch. The interface is available on the .NET ReportingAddin assembly which may be imported and used as follows:

import 'ReportingAddin'

handle (1000,0)

endhandle

using namespace 'Aveva.Core.Reporting'

!!report = object PMLReport()

For example, to add parameters to a parameterized report:

!argNames = object array()

!argNames[1] = 'param1'

!argValues = object array()

!argValues[1] = 'value1'

!!report.addParameters(!argNames, !argValues)

To add scope to a report for limiting the data to be displayed, overriding existing scope defined in the report

! ancestorElements = '/ATEST,/BTEST'

!elements = ''

!!report.AddScope(!ancestorElements, !elements)

And to export report as csv file

!rep1 = object file('C:\rep1.repv')

!csv1 = object file('C:\rep1.csv')

!!report.exportAsCsv(!rep1.fullname(), !csv1.fullname())

Errors loading the report data may be logged by adding a handler to the response event.

The interface has the following methods:

Name

Result

Purpose

AddParameters(ARRAY argNames, ARRAY argValues)

No Result

Adds parameters to report as 2 arrays of argument names and values, which will be used to generate a parameterized report.

AddScope(STRING ancestorElements, STRING elements)

No Result

Specify scope value to filter the data given by comma separated list of ancestor elements and comma separated list of elements.

AddScope(STRING ancestorElements, STRING elements, BOOLEAN fully,
REAL minX,
REAL minY,
REAL minZ,
REAL maxX,
REAL maxY,
REAL maxZ)

No result

Specify scope value to filter the data given by comma separated list of ancestor elements, comma separated list of elements, if limit box is specified then whether it should be considered fully or partially, to construct limit box minX, minY, minZ, maxX, maxY, maxZ.

AddScope(STRING ancestorElements, STRING elements,
BOOLEAN fully,
REAL minX,
REAL minY,
REAL minZ,
REAL maxX,
REAL maxY,
REAL maxZ,
BOOLEAN includeCE

No Result

If includeCE is TRUE the current element will be included in the Ancestor Element list.

ExportAsCsv(STRING reportFileName, STRING destinationFilename)

No Result

Export report to .csv file.

ExportAsPdf(STRING reportFileName, STRING destinationFilename)

No Result

Export report to .pdf file.

ExportAsXlsx(STRING reportFileName, STRING destinationFilename)

No Result

Export report to .xlsx file.

ExportAsXls(STRING reportFileName, STRING destinationFilename)

No Result

Export report to Xls file.

InitializePrinterSetting()

No Result

Initialize the printer settings.

OpenReportManager

No Result

Opens report manager.

Print(STRING reportFileName)

No Result

Print report with system defined printer settings passing name of report definition file.

PrintDirect(STRING reportFileName)

No Result

Print report with user defined printer settings.

PublishToAVEVAAIM
(STRING reportFileName, STRING pdfFilename)

No Result

Publishes report to AVEVA AIM in form of .pdf file.

RemoveParameters()

No Result

Removes the parameters applied to report.

RemoveScope()

No Result

Removes the scope applied to report.

ExportAsCsv(STRING reportFileName, STRING destination
Filename, STRING encoding, STRING textExportMode, STRING separator, BOOL quoteStringsWithSeparators)

No Result

Export report to csv file with additional settings.

Specify names of report file (.repv) and destination file (.csv).

Set encoding to one of Unicode(UTF16), UTF32, UTF7, UTF8, BigEndianUnicode(UTF16BE), ASCII, Default (windows specific encoding type).

Set text export mode to 'Text' for all data fields to be exported as strings (the default), or 'Value' for all formatting to be removed.

Specify the separator character (default is comma, i.e. ',').

Specify whether to place quotation marks around text elements containing symbols which are the same as the specified separator string.

ExportAsXls(STRING reportFileName, STRING destinationFilename, STRING exportMode, STRING pageRange, STRING sheetName, STRING textExportMode, BOOL showGridLines)

No Result

Export report to Xls file with additional settings.

Specify names of report file (.repv) and destination file (.xls).

Set export mode to 'Single file' (the default), or 'Different files' to enable the page range property.

Specify the page range, e.g. '1,3,5-12' (if there are no valid page numbers in the page range string, all pages of the document will be exported).

Specify the sheet name to be set in the destination file. In a multi-page file the sheet name will be this string concatenated with the page number.

Set text export mode to 'Text' for all data fields to be exported as strings (the default), or 'Value' for all formatting to be removed.

Specify whether to show grid lines in the exported file.

ExportAsXlsx(STRING reportFileName, STRING destinationFilename, STRING exportMode, STRING pageRange, STRING sheetName, STRING textExportMode, BOOL showGridLines)

No Result

Export report to Xlsx file with additional settings.

Specify names of report file (.repv) and destination file (.xlsx).

Set export mode to 'Single file' (the default), or 'Different files' to enable the page range property.

Specify the page range, e.g. '1,3,5-12' (if there are no valid page numbers in the page range string, all pages of the document will be exported).

Specify the sheet name to be set in the destination file. In a multi-page file the sheet name will be this string concatenated with the page number.

Set text export mode to 'Text' for all data fields to be exported as strings (the default), or 'Value' for all formatting to be removed.

Specify whether to show grid lines in the exported file.

Related Links
TitleResults for “How to create a CRG?”Also Available in