Question:
How can I print a Report with an E3Chart created in an XControl?
Solution:
Since the chart is on a screen that opens in a splitter, you must write the name of this splitter in the Report‘s script. To check the splitter’s name where the screen opens, set a MessageBox in the screen’s OnPreShow event:
MsgBox Frame.Name
After checking the splitter’s name, write the following script in the Report‘s OnBeforePrint event:
Sub OnFormat
End Sub
Sub OnBeforePrint
set Chart = Report.Sections(“PageHeader”).Controls(“E3Chart1”)
set ChartScreen = Application.GetFrame(“Splitter1”).Screen.Item(“XControl11”).Item(“E3Chart1”)
Chart.CopyConfig(ChartScreen)
Chart.LoadData()
End Sub