Using an E3Chart in reports.

There are some peculiarities when creating an E3Chart in a report that differentiates it from an E3Chart in an application. When used in an application, the E3Chart can plot charts and retrieve real-time, historic, and mixed data. When used in reports, on the other hand, you won’t be able to use real-time data.

In addition, you can set up the E3Chart according to the user’s preferences, and its properties can be accessed via the report’s scripts. Note however that no report’s objects can be accessed externally. This means that, when creating a report via application, you won’t be able to access its properties or its objects via scripts. Therefore, the objects’ settings, including the E3Chart’s, can only be accessed directly in E3Studio or in the report’s events.

The most common application for an E3Chart in a report is to create in the report a historic chart that is being shown in the application’s screen. To do so, follow these procedures:

  • In the E3Chart inserted onto screen, confirm the existence of any historic data (for mixed and/or historic pens).
  • Insert an E3Chart in the report (in the following example, the E3Chart object is inserted into the report’s PageHeader section). Note that the E3Chart can’t be inserted into the report’s Details section.
  • Create the following script in the report’s OnBeforePrint event:
Sub OnBeforePrint

set chart = report.Sections("PageHeader").Controls("E3Chart1") 'Indicates object path in the report
set chartsource = Application.GetFrame().Screen.Item("E3Chart1") 'Path for "Source" Chart (the one in the application)
chart.CopyConfig(chartsource)
chart.LoadData()

End Sub

After having created this script according to the settings in your application, the chart will be visualized with the same data and the same appearance as in the screen.

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 *