Question:
I need to check/change the value of a certain property in all “Label” objects from a report’s PageHeader section. In this case, can I scroll a report section in Elipse E3 for all objects of the same type, in order to check/change the values in this property all at once? How can I do so?
Solution:
Yes, you can. Basically, an Elipse E3 report can contain more than one section; each section of the report contains a group of controls that can be processed and printed at the same time.
To scroll all objects of the same type in order to find values of a property they share, just use for each instruction in the controls of the desired section of the report; below, you can see how this happens to a “Label” object, for example.
Sub OnBeforePrint for each element in report.Sections("PageHeader").Controls IF Typename(element) = "Label" THEN msgbox element.Caption END IF next End Sub
The option Script Editor allows you to add and edit scripts directly in the report. Firstly, access the Object field to indicate the object where you will create the script; secondly, at Events field, add the report event to where the action will take place.
After applying the for each instruction to scroll a report section for all objects of the same type, you can check and/or change a specific property in this object.