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