KB-33387: Error when generating the E3Chart’s report on a modal screen.

Question:

When I try to generate a report from an E3Chart that is on a modal screen that was opened from another modal screen, there is a script error in the report’s  CopyConfig method. Why does this happen?

Solution:

The windows that are opened are called (by default) Splitter1. In this situation, when two modal screens are opened, you will have the following windows:

  • Viewer
  • ModalScreen1 (FrameName = Splitter1)
  • ModalScreen2 (FrameName = Splitter1)

The ModalScreen2 is the one with the E3Chart for printing, but the report executes the following line when the user fires the printing command:

Set ChartScreen = Application.GetFrame(“Splitter1”).Screen.Item(“E3Chart1”)

The GetFrame method will first run into the ModalScreen1 screen (whose FrameName = Splitter1), and consequently search for the E3Chart1 object, which it doesn’t have, and it will cause an error.

By using the Open Screen pick, you can inform the name of the frame that will open, but the Open Modal Screen pick doesn’t have this option. Therefore, all modal screen will have the same FrameName.

To avoid any naming conflict in  GetFrame() method, some alternatives are:

  • inserting the E3Chart on the first modal screen;
  • opening all screens as “non modals”;
  • creating only the last screen as modal.
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 *