ActiveReports for .NET 3 Online Help Request technical support
Custom Controls and ChartFX
See Also
User Guide > Samples and Walkthroughs > Walkthroughs > Standard Edition Walkthroughs > Advanced > Custom Controls and ChartFX

Glossary Item Box

ActiveReports for .NET 3.0 allows you to drop a third party control as a custom control onto an ActiveReport.

This walkthrough illustrates how to use ChartFX as a custom control with ActiveReports.

This walkthrough is split up into the following activities:

To complete the walkthrough, you must have ChartFX installed.

When you have completed this walkthrough, you will have a report with a chart that looks similar to the following.

Adding an ActiveReport to a Visual Studio project

To add an ActiveReport to your project

  1. Open a new project in Visual Studio.
  2. From the Project menu, select Add New Item.
  3. Select ActiveReports 3.0 File and rename the file rptChart.
  4. Click Open.

Adding the ChartFX control to rptChart

To add the ChartFX control to rptChart

  1. Click on the ChartFX control in the appropriate toolbox to select it.
    1. To add the ChartFX chart control to Visual Studio 2003, right-click the toolbox and select Add/Remove items.
    2. Select Chart (SoftwareFX.ChartFX namespace, ChartFX(6.2.x)).
    3. Click the OK button.
  2. Drop the Chart control onto the Detail section of rptChart.
  3. Resize the chart control to fill the Detail section.

Adding a Label to the PageHeader

To add a label to the PageHeader

  1. Drag and drop the Label control from the ActiveReports toolbox to the PageHeader section.
  2. Change the Alignment property to Center.
  3. Change the Font Size property to 14 pt.
  4. Change the Text property to "ChartFX Chart based on random values with ActiveReports for .NET 3.0".
  5. Resize the Label to show the text on two lines.  

Adding code for the ChartFx control

Before you can use the following code, you need to add references to ChartFX for .NET (Windows.Forms) and ChartFX Base to your project.

To write the code in Visual Basic or C#

Viewing the report

To view the report

  1. Add the ActiveReports viewer control to a Windows Form.
  2. Add the code needed to set the viewer document equal to the report document. See Using the ActiveReports Windows Form Viewer for help.
You can quickly view your report at design time by clicking the Preview tab at the bottom of the designer.

See Also

©2009. All Rights Reserved.