Printing ActiveX Controls

Description

Alpha Anywhere allows you to print ActiveX controls placed on layouts in the following circumstances.

  • ActiveX controls not bound to data will print on forms and reports. In the case of reports, you may place them in any band of the report.

  • You may place ActiveX controls that are bound to data only in the detail band of the report. You also must insert code in the OnRecord event of the report to bind data from the current record to the ActiveX control.

Example

You may print a SimpleChart chart control placed in the detail section of a report using a script like the following in the detail OnRecord event:

dim pChart as P

pChart = activeX1.activex.this
pChart.Caption = ""
pChart.ShowLegend = .t.
pChart.LegendPos = 3
pChart.ChartData.Clear()
                      
pChart.ChartData.Add(simplechart->Key, simplechart->Data1, 0)
pChart.ChartData.Add(simplechart->Key, simplechart->Data2, 0)

See Also