KB-103387: Scrolling objects in a report section.

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.

Script Editor

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.

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 *