轉(zhuǎn)帖|使用教程|編輯:莫成敏|2020-03-31 10:01:57.727|閱讀 766 次
概述:ActiveReports是一款在全球范圍內(nèi)應(yīng)用非常廣泛的報(bào)表控件。本文介紹了如何在Winform項(xiàng)目集成ActiveReports的內(nèi)容。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
ActiveReports是一款在全球范圍內(nèi)應(yīng)用非常廣泛的報(bào)表控件,以提供.NET報(bào)表所需的全部報(bào)表設(shè)計(jì)功能領(lǐng)先于同類報(bào)表控件,包括對(duì)交互式報(bào)表的強(qiáng)大支持、豐富的數(shù)據(jù)可視化方式、與Visual Studio的完美集成、以及對(duì) HTML5 / WinForm / ASP.NET / ASP.NET MVC / Silverlight / WPF 和 Windows Azure 的多平臺(tái)支持等。
如何在Winform項(xiàng)目集成ActiveReports?本文內(nèi)容為您一一介紹!
Visual Basic.NET中的代碼:
加載頁面/RDL報(bào)表
將以下 Visual Basic. NET 代碼粘貼到 Form_Load 中
Dim file_name As String = "..\..\PageReport1.rdlx" Dim pageReport As New GrapeCity.ActiveReports.PageReport(New System.IO.FileInfo(file_name)) Dim pageDocument As New GrapeCity.ActiveReports.Document.PageDocument(pageReport) Viewer1.LoadDocument(pageDocument)
加載基于代碼的區(qū)域報(bào)表
將以下 Visual Basic. NET 代碼粘貼到 Form_Load 中
Dim sectionReport As New SectionReport1() Viewer1.LoadDocument(sectionReport)
加載基于模板的區(qū)域報(bào)表
將以下 Visual Basic. NET 代碼粘貼到 Form_Load 中
Dim sectionReport As New GrapeCity.ActiveReports.SectionReport() Dim xtr As New System.Xml.XmlTextReader("..\..\SectionReport1.rpx") sectionReport.LoadLayout(xtr) xtr.Close() Viewer1.LoadDocument(sectionReport)
C#中的代碼
加載頁面/RDL報(bào)表
將以下 C# 代碼粘貼到 Form_Load 中
string file_name = @"..\..\PageReport1.rdlx"; GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(file_name)); GrapeCity.ActiveReports.Document.PageDocument pageDocument = new GrapeCity.ActiveReports.Document.PageDocument(pageReport); viewer1.LoadDocument(pageDocument);
加載基于代碼的區(qū)域報(bào)表
將以下 C# 代碼粘貼到 Form_Load 中
SectionReport1 sectionReport = new SectionReport1(); viewer1.LoadDocument(sectionReport);
加載基于模板的區(qū)域報(bào)表
將以下 C# 代碼粘貼到 Form_Load 中
GrapeCity.ActiveReports.SectionReport sectionReport = new GrapeCity.ActiveReports.SectionReport(); System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(@"..\..\SectionReport1.rpx"); sectionReport.LoadLayout(xtr); xtr.Close(); viewer1.LoadDocument(sectionReport);
本文內(nèi)容到這里就完結(jié)了,感興趣的朋友可以下載ActiveReports試用版免費(fèi)體驗(yàn)~您可以關(guān)注我們慧都網(wǎng)信息,了解更多產(chǎn)品資訊~
相關(guān)內(nèi)容推薦:
ActiveReports使用教程:如何在MVC中使用ActiveReports
ActiveReports使用教程:如何在Asp.net 中集成 ActiveReports
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: