Glossary Item Box

Walkthrough: Adding Code for the End-User Report Designer | Walkthrough: Adding Code for the Main Menu | Walkthrough: Adding Code for the Property Grid | Samples | Walkthroughs

See Also ActiveReports for .NET 2 Online Help Send feedback to Data Dynamics

Walkthrough: Creating the Basic Layout for an End-User Report Designer

This walkthrough illustrates how to set up a basic layout of an end-user report designer on a Windows Form.

This walkthrough is split up into the following activities:

When you have completed this walkthrough, you will have a basic layout which looks similar to the following.

Adding a Windows Form to a Visual Studio project

To add a Windows Form to a Visual Studio project

  1. Open a Visual Studio project.
  2. Click on Project > Add Windows Form...
  3. Name the form frmDesigner and click Open.
  4. Resize frmDesigner to the desired height and width.
  5. Change the text for frmDesigner to "End-User Report Designer."

Adding panels and splitters to the form

To add panels and splitters to the form

  1. Add a panel to the form and set the Dock property to Top.
  2. Add a second panel to the form and set the Dock property to Left.
  3. Add a third panel to the form and set the Dock property to Right.
  4. Add a splitter to the form and set the Dock property to Right.
  5. In the right panel, add a panel and set the Dock property to Bottom.
  6. Add a splitter to the right panel and set the Dock property to Bottom.
  7. Add a panel to the right panel and set the Dock property to Fill.

Adding the ActiveReports end-user report designer control to the form

To add the control

  1. Click at the top of frmDesigner to select the form.
  2. Click on the ActiveReports Designer control from the toolbox and drag it onto the form.
  3. Set the Dock property to Fill.

Adding the Report Explorer to the form

To add the Report Explorer

  1. Click on the top right panel to select it.
  2. Click on the ActiveReports ReportExplorer control from the toolbox and drag it onto the panel.
  3. Set the Dock property to Fill.
  4. Set the ReportDesigner property to designer1.

Adding the Property Grid to the form

To add the Property Grid

  1. Right-click on the toolbox where you wish to add the Property Grid control.
  2. Click on Customize Toolbox...
  3. Select the .NET Framework Components tab.
  4. Select PropertyGrid from the list and click OK.
  5. Click on the bottom right panel to select it.
  6. Click on the Property Grid icon and drag it onto the panel.
  7. Set the Dock property to Fill.

Adding a label to the form

To add a label

  1. Add a label to the left panel.
  2. Set the Dock property to Top.
  3. Change the BackColor to Control Dark.
  4. Change the ForeColor to Control Light Light.
  5. Change the Text to "ActiveReports."

Adding Toolbars and Combo Boxes to the form

To add toolbars and combo boxes

  1. Click on the top panel to select it and add a toolbar to the panel.
  2. Change the name of the toolbar to tlbLayout.
  3. Click on the left panel to select it and add a toolbar to the panel.
  4. Set the Dock property to Fill.
  5. Change the name of the toolbar to tlbARToolbox.
  6. Add three combo boxes to the top panel underneath tlbLayout.
  7. Set the Dock property to Left for all three combo boxes and change the names to: cmbClassName, cmbFonts and cmbFontSize.
  8. Add a toolbar to the top panel underneath tlbLayout.
  9. Set the Dock property to Fill.
  10. Change the name of the toolbar to tlbReport.

Adding a Main Menu control to the form

To add a Main Menu control

  1. Click on frmDesigner to select it.
  2. Click on the MainMenu control and drag it onto the form.
  3. Set the Menu property for frmDesigner to MainMenu1.
  4. Add the following items to the menu:
    • &File--change the name to mnuFile
    • &Print Preview--change the name to mnuPrintPreview
    • -
    • &Load Layout--change the name to mnuLoadLayout
    • &Save Layout--change the name to mnuSaveLayout
    • -
    • Page Set&up--change the name to mnuPageSetup
    • -
    • E&xit--change the name to mnuExit

Walkthrough: Adding Code for the End-User Report Designer | Walkthrough: Adding Code for the Main Menu | Walkthrough: Adding Code for the Property Grid | Samples | Walkthroughs

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.