Preconfiguration "PmReport - Alarms history"

This preconfiguration can be activated when creating a new object (e.g. by "New object" in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: " / Report (PmReport)".

This preconfiguration can be used with the objects: PmFolder or PmRoot.

Preconfiguration creates an object of type PmReport. The object is connected by the Source file of the report template configurator to the corresponding template file RepAlEv.htm. The templates are located in the PROMOTIC system in the Resource\Report folder.
There is a script in the onReportRequest event.

At the beginning of the script it is necessary to define the valid path to the PmAlarmEvent object in the oAl variable.

The GetHistoryData method is used for reading the data array:

sColumns (variable) defines which columns are to be displayed in the protocol
sFilter1 (variable) defines that the columns wil have their titles localized, up to 200 records will be displayed and last 500 recods will be searched.

By the SetKeyValue the following items are transferred into the template file :

Title1 - report title
Title2 - filtering parameters used and the timespan of the displayed alarm data
nRowsFirst - the number of rows of the table on the first page
nRowsNext - the number of rows of the table on following pages
aData - the corresponding alarm data array
The input fitering parameters can be used for displaying this report. These will allow to display only the specific alarms that are requested. In the script of the onReportRequest event, the value of this parameter is received as additional filtering formula (sFilter2) of the PmAlarmEvent.GetHistoryData method.

It is possible to use the source, desc, comment and priority parameters, either separately or combined.

These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the application object tree. This is a system name and must not contain diacritics, empty string, spaces and the first character must not be a number.

Default: "ReportAlHistory"

Alarm protocol titlealarm protocol title
Path to alarms objectRelative or absolute path to PmAlarmEvent object.
The example of opening the PmReport object without a parameter:
Called in the onButtonUp event of the PmiButton graphic item. The object will be opened as an independent window.
pMe.PmPanel.OpenView "/ReportAlHistory", "target:_blank;"
The example of opening the PmReport object with a parameter:
Called in the onButtonUp event of the PmiButton graphic item. The object will be open in a frame "main" in the PmWorkspace object and with a value of the source parameter defined in the sParams default value configurator changed to Boil.
pMe.PmPanel.OpenView "/ReportAlHistory", "target:main;", "par:source=Boil;"
The example of the PmReport object print:
Called in the onButtonUp event of the PmiButton graphic item. The example is functional only in the local application. If the print is to be functional also in the Web client, then the SaveToString method must be called in the panel method on the server.
Dim sReport
sReport = pMe.Pm("/ReportAlHistory").SaveToString("")
Pm.PrintHtmlPage sReport, "sourcetype:htmlstring;printer:select;"
PROMOTIC 8.3.20 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice