界面组件DevExpress Reporting v23.1亮点 - 全新升级报表查看器

DevExpress Reporting是.NET Framework下功能完善的报表平台,它附带了易于使用的Visual Studio报表设计器和丰富的报表控件集,包括数据透视表、图表,因此您可以构建无与伦比、信息清晰的报表

界面组件DevExpress Reporting v23.1已经发布一段时间了,新版本在报表查看器中拥有新的缩放选项、发布新的内容安全策略等,欢迎 下载最新版体验~

DevExpress Reporting v23.1正式版下载(Q技术交流:909157416)

Reporting for ASP.NET Core
内容安全策略 - 禁止内联样式和脚本

新版本改进了对ASP.NET Core应用程序中Web报表组件的内容安全策略支持:您现在可以实现一个基于nonce的CSP,这将允许从DevExpress Web Document Viewer(文档查看器)和Web Report Designer(报表设计器)的网页中删除style-src和script-src指令的不安全内联关键字。

EFDataSource - ASP.NET Core依赖注入中的DbContext

使用新的API从绑定到EFDataSource报表的ASP.NET Core服务器中解析适当的Entity Framework Core上下文。

在依赖注入容器中注册上下文,调用"Startup"类的ConfigureServices方法中的AddDbContext方法来指定所需的连接字符串。

C#

cs 复制代码
builder.Services.AddDbContext<OrdersContext>(options => options.UseSqlite("MyConnectionString"), ServiceLifetime.Transient);

实现IEFContextProviderFactoryIEFContextProvider接口。

C#

cs 复制代码
using DevExpress.Data.Entity;
using DevExpress.DataAccess.Web;
using System;
using Microsoft.Extensions.DependencyInjection;
// ...
public class CustomEFContextProviderFactory : IEFContextProviderFactory {
private readonly IServiceProvider serviceProvider;

public CustomEFContextProviderFactory(IServiceProvider serviceProvider) {
this.serviceProvider = serviceProvider;
}

public IEFContextProvider Create() {
return new CustomEFContextProvider(serviceProvider.CreateScope());
}
}

public class CustomEFContextProvider : IEFContextProvider, IDisposable {
private readonly IServiceScope scope;
public CustomEFContextProvider(IServiceScope scope) {
this.scope = scope;
}

public object GetContext(string connectionName, Type contextType) {
if(connectionName == "efCoreConnection")
return scope.ServiceProvider.GetService(contextType);
return null;
}

public void Dispose() {
scope.Dispose();
}
}

使用"Startup"类的ConfigureServices()方法来注册factory实现。

C#

cs 复制代码
services.ConfigureReportingServices(configurator => {
configurator.ConfigureWebDocumentViewer(viewerConfigurator => {
viewerConfigurator.RegisterEFContextProviderFactory<CustomEFContextProviderFactory>();
});
});
Reporting for Blazor
Blazor Report Viewer --- 全新的缩放选项

新的缩放选项包括:

  • 页面宽度 - 缩放页面来适应页面宽度。
  • 整个页面 - 缩放页面来显示整个页面。

新版本改变了默认的缩放级别,现在是整页。

Blazor Report Viewer - 支持WebAssembly、提前 (AOT)编译和.NET MAUI Blazor

新版本中原生的Blazor Report Viewer组件支持Blazor WebAssembly (WASM)托管模型和提前(AOT)编译,您现在可以在浏览器中预览、打印和导出报表(不需要ASP. NET Core后端)。

我们还用WebAssembly Reporting Application选项扩展了项目模版。

您可以在.NET MAUI应用程序中利用原生Blazor Report Viewer组件的功能,方法是在BlazorWebView中托管该组件。

Reporting for .NET MAUI

您可以在iOS和Android的.NET MAUI应用程序中使用DevExpress Reporting工具(生成和导出报表)。

相关推荐
码观天工1 天前
C#高性能开发之类型系统:从C# 7.0 到C# 14的类型系统演进全景
性能优化·c#·.net·memory·高性能·record·c#14·类型系统
程序员秘密基地1 天前
基于c#,wpf,ef框架,sql server数据库,音乐播放器
sql·sqlserver·c#·.net·wpf
Zhen (Evan) Wang1 天前
.NET 6 WPF 利用CefSharp.Wpf.NETCore显示PDF文件
.net·wpf·.netcore
我是唐青枫2 天前
C# 如何比较两个List是否相等?
c#·.net
时光追逐者2 天前
C#/.NET/.NET Core拾遗补漏合集(25年4月更新)
c#·.net·.netcore
Hellc0072 天前
完整的 .NET 6 分布式定时任务实现(Hangfire + Redis 分布式锁)
redis·分布式·.net
CF14年老兵2 天前
MVC 应用程序中使用 FluentValidation 进行验证的重要性
性能优化·mvc·.net
搬砖工程师Cola3 天前
<C#>.NET WebAPI 的 FromBody ,FromForm ,FromServices等详细解释
开发语言·c#·.net
时光追逐者3 天前
C#/.NET/.NET Core技术前沿周刊 | 第 35 期(2025年4.14-4.20)
c#·.net·.netcore
码观天工3 天前
.NET 原生驾驭 AI 新基建实战系列(四):Qdrant ── 实时高效的向量搜索利器
c#·.net·向量数据库·qdrant