Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Preconfiguration "PmaReport - Current alarm states"

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

This preconfiguration can be used with the objects: PmaFolder or PmaRoot.

 
The preconfiguration creates an object of the PmaReport type. This object is connected in the "Source file of the report template" configurator to the corresponding RepAlEv.htm. The templates are located in the PROMOTIC system in the \Promotic\PmVXXYY\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 PmaAlarmGroup object in the oAl variable.

The GetStateData method is used for reading the data array:

sColumns (variable) specifies which columns are to be displayed in the protocol
sFilter1 (variable) specifies that the columns wil have their titles localized, up to 100 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 time-range of the displayed alarm data
nRowsFirst - the number of rows in the table on the first page
nRowsNext - the number of rows in 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 PmaAlarmGroup.GetStateData method.

The source, desc, comment and priority parameters can be used, 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 tree of Pma objects. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics, empty string, spaces and the first character must not be a number.

Default: "ReportAlState"

Alarm protocol title
Path to alarms objectRelative or absolute path to the PmaAlarmGroup object.
Object scripting languageApplication object scripting language
0 - vbscript
1 - javascript
Enable as Web componentSpecifies whether this object has to be registered as a Web server component

After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value.

PmaWeb objectPath in the tree of Pma objects to the PmaWeb, PmaWebFolder or PmaWebLang object where the registration is carried out.

Macro expression can be used for input (it is evaluated after starting the application).

After the preconfiguration is created, the "PmaPanel > Web server > PmaWeb object" configurator will be set to this value.

The example of opening the PmaReport object:
Called in the onButtonUp event of the PmgButton object. The object will be opened as an independent window.
JavaScriptVBScriptSelect and copy to clipboard

pMe.PmPanel.OpenView("/ReportAlState", "_blank");
The example of opening the PmaReport object with parameter:
Called in the onButtonUp event of the PmgButton object. The object will be open in a frame "main" of the PmaWorkspace object and with a value of the source parameter defined in the "sParams default value" configurator changed to Boil.
JavaScriptVBScriptSelect and copy to clipboard

pMe.PmPanel.OpenView("/ReportAlState", "target:main;", "pars:{source:Boil}");
The example of the PmaReport object print:
Called in the onButtonUp event of the PmgButton object. 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.
VBScriptSelect and copy to clipboard

Dim sReport
sReport = pMe.Pm("/ReportAlState").SaveToString("")
Pm.PrintHtmlPage sReport, "sourcetype:htmlstring;printer:select;"
PROMOTIC 9.0.14 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