DevExpress Reports supports a variety of customization options. Over the years, our customers have extended built-in functionality to address a wide range of usage scenarios: from custom user interface elements, panels, and toolbar buttons, to custom controls, export types, and aggregate functions/summaries.
Customization options for you, your enterprise, and your customers already exist – be they features for the DevExpress Document Viewer or the DevExpress End-User Report Designer. If you've yet to acquaint yourself with these capabilities, refer to the following help topics:
- Custom Functions / Custom Aggregate Functions
- Custom Controls in WinForms Apps / Custom Controls in ASP.NET Core Apps
- Customize the Web Document Viewer Toolbar (ASP.NET Core)
In our next release cycle, we will address the needs of report developers: those who create reports via the DevExpress Visual Studio Report Designer (and develop pre-built report templates for applications that target .NET).
Based on feedback, we know that you want to test and analyze the behavior of custom functions/controls when you switch to the Preview tab of Visual Studio Report Designer in .NET apps. This option helps save time, as you do not need to run an app in debug mode each time you make a change. Second, this level of customization gives report developers more freedom and flexibility.
Accordingly, here’s what we expect to deliver in v22.2.
Custom Functions
With our v22.2 release, we expect to introduce a VSDesignerCustomFunction
attribute. This attribute will allow you to register your custom functions, so that the DevExpress Visual Studio Report Designer (for a project targeting .NET) displays it in the Expression Editor.
[VSDesignerCustomFunction]
public class CustomFormatFunction : ReportCustomFunctionOperatorBase {
public override string FunctionCategory
=> "String";
public override bool IsValidOperandCount(int count)
=> count == 2;
// ...
}
You'll simply need to implement a class for your custom function and assign the VSDesignerCustomFunction
attribute to this class.
Custom Database Providers
In addition to custom functions, you will be able to add custom SQL data providers to the Report Designer for Visual Studio projects (targeting both .NET Framework and .NET/.NET Core). We expect to display your custom database provider within the DevExpress Data Source Wizard list:
As you might expect, this enhancement will allow you to display data from unsupported data sources within a report (you’ll always be able to create custom providers on your own).
Here is a code snippet that demonstrates how you are supposed to register your own provider in the Visual Studio Report Designer:
[VSDesignerCustomSqlProvider(DisplayName="CustomSqlProvider", ProviderKey="CustomProvider"]
class CustomSqlProvider : ConnectionProviderSql {
// ...
}
Like custom functions, you will need to implement a class for your custom provider and assign the VSDesignerCustomSqlProvider
attribute to this class.
Custom Controls
You can already implement custom controls based on DevExpress Report controls and add them to the Visual Studio Toolbox in .NET Framework projects. See the following help topic for custom control implementation examples: Use Custom Controls.
In v22.2, we will also implement a new API to allow you to add custom controls to Visual Studio projects that target .NET/.NET Core. The final interface for adding custom controls is currently subject to discussion.