如何创建使用C#与Active报表的报表? [英] How to create a report using c# with Active Reports?

查看:239
本文介绍了如何创建使用C#与Active报表的报表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从来没有在VS创建的任何报告,现在我在添加引用到我的项目面临的问题。
任何一个可以告诉我,报告生成的基本知识,以及如何添加引用到我们的项目?

I have never created any report in VS, now i am facing problem in adding reference to my project. Can any one tell me the basics of Report Generation and How to add reference to our project?

推荐答案

目的报告的产生是从源获取数据,如一个数据库,XML流或电子表格,并使用它在满足一个特定的人的读者的格式,以产生一个文件。

The purpose of report generation is to take data from a source such as a database, XML stream or a spreadsheet, and use it to produce a document in a format which satisfies a particular human readership.

请参见 ComponentOne的HelpCentral主动报告为主题开始使用的ActiveReports。

Please refer ComponentOne HelpCentral for Active Reports for topics to get started with ActiveReports.

特点:


  1. 多个报告类型以满足您的报告需求: 固定页面布局的为开发人员提供创建报表,其中布局是首要重点的新方式。伟大创造发票,招股书报告,表格,或其他高度结构化报告。
    连续页面布局的便于使用表,交叉表,图表和其他数据区域与灵活布局创建报告。

  1. Multiple Report Types to Fit Your Reporting Needs: Fixed Page Layout provides developers with a new way of creating reports where layout is the primary focus. Great for creating invoices, prospectus reports, forms, or other highly structured reports. Continuous Page Layout makes it easy to create reports using tables, crosstabs, charts, and other data regions with flexible layouts.

数据可视化:这包括简单的上市或保一起对照组,主详细报告,分报告,水平和垂直多列报告,地址标签和徽章,或格式丰富信件,邮件合并的支持。简单的轻量级报表控件让你轻松打造出令人目眩神迷的报告。

Data Visualization: This include simple listing or groups with keep-together control, master-detail reports, sub-reports, horizontal and vertical multi-column reports, address labels and badges, or richly formatted letters with mail merge support. Simple and lightweight report controls allow you to easily create dazzling reports.

数据绑定 .NET数据源允许你连接到任何标准数据库,以及.NET内存中的对象和集合。此外,未结合的数据模式打开以从任何地方的数据的报告,以任何形式。如果你的应用程序可以访问它,这样可以将报表引擎。

Data Binding .NET data sources allow you to connect to any of the standard databases, plus .NET in-memory objects and collections. In addition, the unbound data mode opens up the report to data from anywhere, in any form. If your application can access it, so can the report engine.

Visual Studio集成设计时支持

从其他报告工具迁移支持

全局选项和本地化支持

基本步骤报表生成与活动报告:


Basic Steps in Report Generation with Active Reports:

这演练分成以下活动:


  1. 要在ActiveReport添加到Visual Studio项目


  • 创建一个新的Visual Studio项目。

  • 从项目菜单,选择Add New Item。

  • 在出现的Add New Item对话框中,选择的ActiveReports 8页的报告,并在名称字段中,重命名该文件作为rptMasterDetail。

  • 单击添加按钮以打开在设计一个新的固定页的报告。

  • Create a new Visual Studio project.
  • From the Project menu, select Add New Item.
  • In the Add New Item dialog that appears, select ActiveReports 8 Page Report and in the Name field, rename the file as rptMasterDetail.
  • Click the Add button to open a new fixed page report in the designer.

要将报表连接到数据源


  • 在报表资源管理器中,右键 - 单击数据源节点,并从Add按钮添加数据源选择或选择数据源。

  • 在弹出的报表数据源对话框中,选择常规页,并在名称字段中输入一个名称,如ReportData。

  • 在该页面中,创建一个到卷轴数据库的连接。请参阅连接到数据源的信息,连接到数据源。

添加数据集


  • 在报表资源管理器中,右键单击数据源的节点,然后选择添加数据集选项,或从添加选择数据集按钮。

  • 在弹出的数据集对话框中,选择常规页面,输入数据集作为CustomerOrders的名称。此名称显示为一个子节点在报表资源管理器中的数据源图标。

  • 在该对话框的查询网页,在查询字段中输入下面的SQL查询。

  • In the Report Explorer, right-click the data source node and select the Add Data Set option or select Data Set from the Add button.
  • In the DataSet Dialog that appears, select the General page and enter the name of the dataset as CustomerOrders. This name appears as a child node to the data source icon in the Report Explorer.
  • On the Query page of this dialog, in the Query field enter the following SQL query.

选择客户ID,名称,姓氏,数量,价格,[数量] * [参考价格] AS
共有来自CustomerOrders WHERE客户id< 1010

SELECT CustomerID, Title, LastName, Quantity, Price, [Quantity]*[Price] AS Total FROM CustomerOrders WHERE CustomerID < 1010

点击的验证数据集图标右上角的查询框上方,以验证查询。

Click the Validate DataSet icon at the top right hand corner above the Query box to validate the query.

4 报表创建布局

5 查看报表


  • 单击预览选项卡以查看在设计时的报告。

  • 打开在浏览器中的报告。请参阅使用浏览器以获得更多信息。

要添加一个引用的Visual C#


  • 在解决方案资源管理器中,右键单击该项目节点,然后单击添加引用。

  • 在添加引用对话框中,选择表示要引用组件类型的标签。

  • 选择您要引用的组件,然后单击确定。

这篇关于如何创建使用C#与Active报表的报表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆