ActiveReports 6 Online Help
Creating a Basic End User Report Designer (Pro Edition)
Show AllShow All
Hide AllHide All

Using ActiveReports Professional Edition, you can set up a custom end-user report designer. This walkthrough illustrates how to set up a basic end-user report designer on a Windows form. (The Designer control is not supported on the Web.)

Note: The Designer control requires the .NET Framework full profile version. To ensure you are using the full profile version, go to the Visual Studio Project Properties, then to the Compile tab, Advanced Compile Options... (for Visual Basic projects) or to the Application tab (for C# projects) and in the Target framework field select a full profile version.

This walkthrough is split up into the following activities:

When you have finished this walkthrough, you will have a working end-user report designer that looks like the following.

Note: If you need help with adding the Designer controls to your Visual Studio toolbox, see Adding ActiveReports Controls.

To add controls to the form

  1. Change the Name property of your Windows form to formDesigner.
  2. Resize the form so that you can comfortably add the controls.
  3. Drag the following controls in the order listed from the Visual Studio toolbox onto the form, setting the properties as indicated. (If you have not yet added the ActiveReports controls to your toolbox, see the Adding ActiveReports Controls topic.)

    Controls for the form

  4. Select arDesigner and in the Properties window, drop down the PropertyGrid property and select arPropertyGrid.
  5. With the controls added in the correct order and all of the above properties set, the form looks similar to the following:

To import the Toolbox library

  1. Right-click the form and select View Code.
  2. In the code view that appears, add the following code to give your project access to the Toolbox library.

The following examples show what the code looks like.

To write the code in Visual Basic.NET

To write the code in C#

To add an OnExit method

  1. Right-click in any section of formDesigner, and select View Code.
  2. In the code view that appears, add the following code to create an OnExit method that you can call from the Exit menu item we create in the next procedure.

The following examples show what the code looks like.

To write the code in Visual Basic.NET

To write the code in C#

To create a data toolbox group

  1. Add the following code right after the OnExit method to create a data group on the toolbox.
  2. This code creates a LoadTools method that you can call in the formDesigner Load event to load the new toolbox group into the toolbox.

The following examples show what the code looks like.

To write the code in Visual Basic.NET

To write the code in C#

To set up the designer's toolbox, menus, toolstrips and status bar

  1. In the Design view of the form, double-click the title bar of formDesigner. This creates an event-handling method for the formDesigner Load event.
  2. Add code to the handler to:
    • Set up the toolbox
    • Set up the menu and tool strips
    • Add an Exit command to the menu
    • Set up the status bar

The following examples show what the code for the method looks like.

To write the code in Visual Basic.NET

To write the code in C#

To display the selected object in the status bar

The following examples show what the code to display objects in the status bar looks like.

To write the code in Visual Basic.NET

To write the code in C#

See Also

How To