翻譯|產(chǎn)品更新|編輯:龔雪|2023-11-15 10:42:12.313|閱讀 93 次
概述:界面組件DevExpress Reporting v23.1已經(jīng)發(fā)布一段時(shí)間了,新版本在報(bào)表查看器中擁有新的縮放選項(xiàng)、發(fā)布新的內(nèi)容安全策略等,歡迎 下載最新版體驗(yàn)~
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷(xiāo)售中 >>
相關(guān)鏈接:
DevExpress Reporting是.NET Framework下功能完善的報(bào)表平臺(tái),它附帶了易于使用的Visual Studio報(bào)表設(shè)計(jì)器和豐富的報(bào)表控件集,包括數(shù)據(jù)透視表、圖表,因此您可以構(gòu)建無(wú)與倫比、信息清晰的報(bào)表
界面組件DevExpress Reporting v23.1已經(jīng)發(fā)布一段時(shí)間了,新版本在報(bào)表查看器中擁有新的縮放選項(xiàng)、發(fā)布新的內(nèi)容安全策略等,歡迎 下載最新版體驗(yàn)~
DevExpress技術(shù)交流群9:909157416 歡迎一起進(jìn)群討論
新版本改進(jìn)了對(duì)ASP.NET Core應(yīng)用程序中Web報(bào)表組件的內(nèi)容安全策略支持:您現(xiàn)在可以實(shí)現(xiàn)一個(gè)基于nonce的CSP,這將允許從DevExpress Web Document Viewer(文檔查看器)和Web Report Designer(報(bào)表設(shè)計(jì)器)的網(wǎng)頁(yè)中刪除style-src和script-src指令的不安全內(nèi)聯(lián)關(guān)鍵字。
使用新的API從綁定到EFDataSource報(bào)表的ASP.NET Core服務(wù)器中解析適當(dāng)?shù)腅ntity Framework Core上下文。
在依賴注入容器中注冊(cè)上下文,調(diào)用“Startup”類(lèi)的ConfigureServices方法中的AddDbContext方法來(lái)指定所需的連接字符串。
C#
builder.Services.AddDbContext<OrdersContext>(options => options.UseSqlite("MyConnectionString"), ServiceLifetime.Transient);
實(shí)現(xiàn)和接口。
C#
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"類(lèi)的ConfigureServices()方法來(lái)注冊(cè)factory實(shí)現(xiàn)。
C#
services.ConfigureReportingServices(configurator => { configurator.ConfigureWebDocumentViewer(viewerConfigurator => { viewerConfigurator.RegisterEFContextProviderFactory<CustomEFContextProviderFactory>(); }); });
新的縮放選項(xiàng)包括:
新版本改變了默認(rèn)的縮放級(jí)別,現(xiàn)在是整頁(yè)。
新版本中原生的Blazor Report Viewer組件支持Blazor WebAssembly (WASM)托管模型和提前(AOT)編譯,您現(xiàn)在可以在瀏覽器中預(yù)覽、打印和導(dǎo)出報(bào)表(不需要ASP. NET Core后端)。
我們還用WebAssembly Reporting Application選項(xiàng)擴(kuò)展了項(xiàng)目模版。
您可以在.NET MAUI應(yīng)用程序中利用原生Blazor Report Viewer組件的功能,方法是在BlazorWebView中托管該組件。
您可以在iOS和Android的.NET MAUI應(yīng)用程序中使用DevExpress Reporting工具(生成和導(dǎo)出報(bào)表)。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都網(wǎng)