KB-52337: Inserting an if…else command inside a report.

Question:

Can an if…else command be inserted into a report’s internal script? Depending on the condition’s result, a Label object’s Caption property will be edited.

Solution:

Yes. The ActiveReport is in fact an ActiveX that is recorded automatically during E3’s installation, and which has its own scripts editor. It allows visualizing and printing instant values from the system’s variables and from data stored in the Database (Alarms, Historics, Queries, and Formulas). To compare a certain data field from the report, which will receive numeric data, you must use CDbl function, which will return the data field’s value converted into Double format. Example:

NOTE: The sample application attached to this article was developed with E3 version 4.0 Build 214.

Attachments:

Sample.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *