Software Customisation
Reference Manual
Summary of Objects, Members and Methods
:
Object Type Details
: PMLReport Object
PMLReport Object
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.Pdms.Reporting'
!!report = object PMLReport()
For example, to add parameters to a parameterised 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:
Methods
PMLSECURELOGIN
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 parameterised 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
Initialise 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
PublishToAVEVANET(STRING reportFileName, STRING pdfFilename)
No Result
Publishes report to AVEVA NET 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 destinationFilename, 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.
PMLSECURELOGIN object is used to control the encrypted command script generation functionality.
Methods
Name
Result
Purpose
PMLSecureLogin( )
PMLSECURELOGIN
Construct an instance of this object
EmbedMacro(BOOLEAN)
NO RESULT
Embed the specified macro
HasLicenceToEmbedMacro( )
BOOLEAN
Returns TRUE if EmbedMacro functionality is available.
Macro(STRING)
NO RESULT
Set the macro to run where STRING specifies the full path of the macro
MDB(STRING)
NO RESULT
Sets the login MDB
Password(STRING)
NO RESULT
Sets the login password
Project(STRING)
NO RESULT
Sets the login project
SaveToFile(STRING)
NO RESULT
Encrypt and save to specified path
User(STRING)
NO RESULT
Sets the login user
VerifyAfter(DATETIME)
NO RESULT
Verify after specified date
VerifyBefore(DATETIME)
NO RESULT
Verify before specified date
VerifyHostnames(ARRAY)
NO RESULT
Verify a number of host names specified as an array of strings
VerifyWinusers(ARRAY)
NO RESULT
Verify a number of windows users specified as an array of strings
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.