The EndUserDesigner Sample demonstrates how to set up a custom end-user report designer using the Designer, ReportExplorer and ToolBox controls. This Sample is part of the ActiveReports Developer Professional Edition.
<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Professional\VB.NET\EndUserDesigner
<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Professional\C#\EndUserDesigner
When you run the sample, the End User Designer appears in the Viewer control. This report designer provides the full functionality of the ActiveReports Designer and supports two types of report layouts: page layout and section layout.
The End User Designer lets you create report layouts and edit them at design time or runtime. The Designer includes the Property Window with extensive properties for each element of the report, the Toolbox is filled with report controls and the Report Explorer with a tree view of report controls.
The End User Designer provides the following menu items.
- New - creates a new report in the designer with the default report template.
- Open - opens an Open File Dialog to load a report.
- Export - exports a report to one of the available formats, such as PDF, HTML, TIFF, Excel, Text, or RTF. This menu option is active during report preview only.
- Save - saves a report.
- Save as - saves a report at the path that you specify.
- Exit - closes the End User Designer.
- Undo - undoes your last action and enables the Redo button.
- Redo - redoes an undone action.
- Cut - removes the selected item(s) and places them on the clipboard.
- Copy - copies the selected item(s) to the clipboard.
- Paste - add the last item on the clipboard to the design surface.
- Convert to CPL Report - (for an FPL page report) converts an FPL page report to a CPL page report.
- Convert to FPL Report - (for a CPL page report) converts a CPL page report to an FPL page report.
- Report Parameters - opens the Report Parameters dialog where you can manage, add and delete parameters.
- Embedded Images - opens the Report dialog to the Images page, where you can select images to embed in a report. Once you add images to the collection, they appear in the Report Explorer under the Embedded Images node.
- Report Properties - opens the Report dialog to the General page where you can set report properties such as the author, description, page header and footer properties, and grid spacing.
- Set Master Report - (for a CPL page report) converts a CPL report to a Master Report.
- Generate Excel Template - (for a CPL page report) creates an Excel template of the report that you or the end user can customize for use with Excel exports to control the way the exported reports appear.
- View - opens the Designer, Script or Preview tab. See Designer Tabs for more details.
- Page Header - (for a CPL page report) toggles the report Page Header on or off.
- Page Footer - (for a CPL page report) toggles the report Page Footer on or off.
Note: Except for View option, all other options in Report menu are disable for a section report. |
For more information on the Designer features, please see ActiveReports Designer.
This is the form with the Export dialog for page report and section report.
A user sees the Export dialog under the Preview tab in the File menu > Export. This dialog allows to select the export type (Excel, Html, Tiff, Pdf, Rtf, Text) and to browse for the file location in local folders where the report is exported.
Control | Name | Description |
---|---|---|
ComboBox | cmbExportFormat | The Export Format combo box that allows to select options (Excel, Html, Tiff, Pdf, Rtf, Text) for the report export type. |
Button | btnOK | The OK button in the lower part of the ExportForm. |
Button | btnCancel | The Cancel button in the lower part of the ExportForm. |
PropertyGrid | exportpropertyGrid | Provides interface for export options of each export type. |
SaveFileDialog | exportSaveFileDialog | The Save File dialog that allows to specify the file name for saving an exported report file. |
Label | lblExport | The Export label in the header of the ExportForm. |
Label | lblExportFormat | The Export Format label of the Export Format combo box. |
Label | lblExportoptions | The Export Options label of the Export property grid. |
Label | lblSelectExporttxt | The Select Export text that describes the purpose of the ExportForm. |
SplitContainer | splitContainer1 | Represents a movable bar that divides the display area of the ExportForm into two resizable panels - the ExportForm header panel and the ExportForm panel with the Export Format combo box and the Property Grid. |
SplitContainer | splitContainer2 | Represents a movable bar that divides the Export Format section consisting of the Export Format combo box with the Export Format label and the Property Grid of ExportForm. |
Right-click the ExportForm in the Solution Explorer and select View Code to see the code implementation for the Export form.
This is the form with a basic end-user report designer that contains the following elements. These elements are dragged from the Visual Studio toolbox onto the form.
Control | Name | Description |
---|---|---|
Designer | reportdesigner | The Designer control that allows you to create and modify a report. |
ReportExplorer | reportExplorer | Gives you a visual overview of the report elements in the form of a tree view where each node represents a report element. |
PropertyGrid | reportpropertyGrid | Provides an interface for each element of the report. |
Toolbox | reporttoolbox | Displays all of the controls specific to the type of report that has focus. |
SplitContainer | bodyContainer | Represents a movable bar that divides the display area of the Viewer into two resizable panels. |
SplitContainer | designerexplorerpropertygridContainer | Represents a movable bar that divides the display area of the designer into two resizable panels -the toolbox and the toolstrip. |
SplitContainer | explorerpropertygridContainer | Represents a movable bar that divides the display area of the designer into two resizable panels - the report explorer and the property grid. |
SplitContainer | MainContainer | Represents a movable bar that divides the display area of the Designer into two resizable panels. |
ToolStripContainer | toolStripContainer1 | Provides a central panel on top of the Designer to hold the Toolstrip element with the menu items. |
Right-click the EndUserDesigner form in the Solution Explorer and select View Code to see the code implementation for the End User Designer.
Concepts
ActiveReports Designer
Exporting