QT报表选型(QT报表系列1)

QT报表选型(QT报表系列1)

 

QT中目前的主流报表框架:NCReport ,CuteReport,QtRPT,LimeReport等,由于NCReport 现在是商业版本,CuteReport,从2017年后就没再更新,所以我们重点介绍后二者。

1、QtRPT 

QtRPT 是用 C++ QtToolkit 编写的易于使用的报告引擎,它允许在一个 XML 文件中组合多个报告。对於单独获取的字段,你可以指定一些条件,这取决于该字段将以不同的字体和背景颜色显示,等等。该项目由两个部分组成:报表库 QtRPT 和报表设计器应用程序 QtRptDesigner。报表文件是 XML 格式的文件,报表设计器可以轻松创建报表 XML 文件。

主要特点:

  • Supported output formats: Printer, PDF, HTML
  • Universal type of data source
  • SQL datasource
  • Report elements: Label field, Images, Diagram
  • Parameters from application side
  • Several reports together
  • Page header/footer
  • Report page/header
  • Data band
  • Data grouping
  • Group header/footer
  • Aggregate functions: AVG, SUM, COUNT
  • Mathematic functions
  • Highlighting of the fields by login conditions
  • Show/hide fields by logic conditions
  • System variables
  • Images: static or from application side
  • Diagrams with manual data or with aggregate functions
  • Barcode printing
  • Pure Qt4/Qt5 code

报表实际效果如下

主页:http://www.qtrpt.tk

SourceForge 主页:https://sourceforge.net/projects/qtrpt

2、LimeReport 

LimeReport - 使用 Qt 框架编写的跨平台 C++ 报表生成器库,用于希望将其添加到应用程序功能中的软件开发人员,以形成使用模板生成的报表或打印报表。库中包含的报表设计器允许创建快速直观的打印表单模板,这些模板可以以 XML 格式保存并用于生成报表页面。因此形成的页面可以发送到预览、PDF 文件或打印机。作为数据源开发人员,可以使用 SQL 数据库或使用 QAbstractTableModel 接口从应用程序传递的数据。此外,还可以初始化作为数据库请求参数可用的变量。LimeReport 的目标是为你的应用程序提供丰富的功能,同时简单地使用工具生成报告,即使没有经验的 IT 用户也可以使用。

 

主要特点:

1.      Added the ability to use QJSEngine instead of deprecated QtScript.

2.      Report designer has been improved.

3.      Inches support has been added.

4.      Embedded dialog designer has been added.

5.      The script editor has been improved.

6.      Added the ability to build only report generator without embedded visual report designer.

7.      Report translation ability has been added.

8.      Added report generation time events with the ability to process them in the report script.

9.      Added the ability to build a report table of contents.

10.   The vertical layout has been added.

11.   Added the ability to transfer an image to the report via a variable.

12.   Endless height has been added.

13.   Added the ability to print a report page on multiple pages of paper.

14.   Added the ability to print on multiple printers.

15.   ChartItem has been added.

16.   Added the ability to use aggregate functions in headers.

17.   Subtotals.

18.   Dark and Light themes have been added to report designer.

19.   Generation result editing mode has been improved.

 

实际效果图:

从风格上个人更喜欢limereport,感觉跟FASTREPORT比较接近,所以后续重点研究这个。

主页:http://limereport.ru

源码仓库:https://github.com/fralx/LimeReport

注:实战示例,解疑答惑。

           --不间端地思考,实时地批判你的工作!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章