Printing an E3Chart.

Question:

How can I print an E3Chart on my application’s screen?

Solution:

To do so, access E3Studio and follow these procedures:

1. Add a Report to the application.

2. In the Report, go to PageHeader section and insert an E3Chart. NOTE: No new settings are required for this E3Chart.

3. Still in the Report, access the Scripts Editor. Use CopyConfig method to copy the configuration of the E3Chart on screen to the E3Chart in the Report. NOTE: With Reports, CopyConfig method works only with Historic pens. E3Chart’s size is not copied, only its settings.

4. In the Object field, choose PageHeader; in the Events field, choose OnBeforePrint.

5. Between Sub OnBeforePrint and End, type the following script:

Set Chart = Report.Sections(“PageHeader”).Controls(“E3Chart1”)
Chart.CopyConfig(Application.GetFrame().Screen.Item(“E3Chart1”))
Chart.LoadData()

6. On the screen with the E3Chart to be printed, add a button executing the script with the report’s printing command. There are two possibilities: one is via Print Report pick, the other is via the Report’s Print method.

Once it is done, just run the application and click the button to print the Report with the E3Chart.

Attached to this article is a demo application showing the procedures described above.

Attachments:

ChartReport.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 *