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

注:實戰示例,解疑答惑。

           --不間端地思考,實時地批判你的工作!

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