ActiveReports是一款在全球范围内应用非常广泛的 表控件,以提供.NET 表所需的全部 表设计功能领先于同类 表控件,包括对交互式 表的强大支持、丰富的数据可视化方式、与Visual Studio的完美集成、以及对 HTML5 / WinForm / ASP.NET / ASP.NET MVC / Silverlight / WPF 和 Windows Azure 的多平台支持等。
ActiveReports正式版
如何在Winform项目集成ActiveReports文内容为您一一介绍!
- 在 Visual Studio Windows 程序中,从 Visual Studio 工具箱中拖动Viewer控件到 Windows 窗体上。
- 将查看器的Dock属性设置为Fill。
- 双击窗体的标题栏,创建Form_Load事件的事件处理方法。
- 在 Form_Load 事件中,添加如下所示代码,以运行 表并将其显示在查看器。
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使用教程:如何在MVC中使用ActiveReports
ActiveReports使用教程:如何在Asp.net 中集成 ActiveReports
想要购买ActiveReports正版授权,或了解更多产品信息请点击【咨询在线客服】
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!