Skip to content

DevExpress-Examples/Reporting-Custom-Controls

Repository files navigation

How to Create a Custom DevExpress Report Control

Report Control Development Steps

To create a new report control, do the following:

  1. Choose a base class. If you cannot find a suitable control to derive from, inherit a component from the XRControl class.

  2. Create the component's object model. Specify a set of properties and related attributes that determine how properties are serialized and displayed in the Property grid.

  3. Create component designers for Visual Studio and the End User Designer. Designers determine the component's appearance and behavior at design time. Add attributes as necessary.

  4. Choose the base class for the component's “brick” - such as the brick that the base class creates. However, if the component inherits from the XRControl class, there are two options - select VisualBrick as the brick's base class if you require a simple brick or PanelBrick if you need a container.

  5. Specify how the component creates its "brick" and map the component's properties to the brick's characteristics.

  6. Implement the BrickExporter class to render the "brick". Override the methods used for drawing and export.

XRSwissQRBill

Refer to the following document for information on XRSwissQRBill implementation: How to Create a Custom DevExpress Report Control - Swiss QR Bill Implementation.

XRRoundLabel and XRRoundPanel

Refer to the following document for information on XRRoundLabel and XRRoundPanel implementation: How to Create Controls with Rounded Corners.

Examples

WinForms

Run the sample project to invoke the WinForms End-User Report Designer with a toolbox that contains the XRSwissQRBill, XRRoundLabel and XRRoundPanel controls.

The project is in the Examples/CustomControlExample.Win folder. File to review: Program.cs.

ASP.NET Core

Run the sample project to invoke the ASP.NET Core End-User Report Designer with a toolbox that contains the XRRoundLabel, and XRRoundPanel controls.

The project is in the Examples/CustomControlExample.AspNetCore folder. Files to review: Startup.cs and Designer.cshtml.

Files to Review

XRSwissQRBill

XRRoundLabel and XRRoundPanel

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)