ActiveReports3 Request technical support
Control Property
See Also  Example


Gets or sets a reference to the hosted control.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Control As Control
Visual Basic (Usage)Copy Code
Dim instance As CustomControl
Dim value As Control
 
value = instance.Control
C# 
public Control Control {get;}

Example

C#Copy Code
private void detail_Format(object sender, System.EventArgs eArgs)
{
   System.Random r =
new System.Random();
   Chart Chart1 =
new Chart();
   
//Cast customControl as ChartFX chart
   
Chart1 = ((SoftwareFX.ChartFX.Chart)this.CustomControl1.Control);
   
//Open the communication channel
   
Chart1.OpenData(SoftwareFX.ChartFX.COD.Values, 3, 3);

   
for (int i=0;i<3;i++)
   {
       
for (int j=0;j<3;j++)
       {
           
//Assign the values to the series selected
           
Chart1.Value[i, j] = r.NextDouble() *  100;
       }
   }
   
//Close the communication channel
   
Chart1.CloseData(SoftwareFX.ChartFX.COD.Values);
}
Visual BasicCopy Code
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
    Dim r As New System.Random()
    Dim Chart1 As SoftwareFX.ChartFX.Chart
    'Cast customControl as ChartFX chart
    Chart1 = CType(Me.CustomControl1.Control, SoftwareFX.ChartFX.Chart)

    Dim i As Integer
    Dim j As Integer

    'Open the communication channel
    Chart1.OpenData(SoftwareFX.ChartFX.COD.Values, 3, 3)
    For i = 0 To 2
        For j = 0 To 2
            'Assign the values to the series selected
            Chart1.Value(i, j) = r.NextDouble() * 100
        Next j
    Next i
    'Close the communication channel
    Chart1.CloseData(SoftwareFX.ChartFX.COD.Values)
End Sub

See Also