Home - Otaku-Projects/ReportEngine GitHub Wiki

Welcome to the ReportEngine wiki!

Here you will get the Quick Guide for report engines

EPPlus

EPPlus 5 document and Quick Guide

iText7

iText7 document and Quick Guide

Open XML SDK

Open XML SDK Quick Guide

Puppeteer

Puppeteer/Puppeteer-Report Document and Quick Guide

Jasper Reports

jsreport/jsreport-dotnet Document and Quick Guide

Crystal Report

Installaion, Documentation, Example and Tutorial

Conclusion

In general speaking, declear you need, excel or pdf or both, read or write or both.

In sample words, it depends and subjective.

However, in shorts, if the costs not a problem, pay for it will save you a lot of times

the generation approach listed below:

For excel

  • front end, use javascript to generate xlsx (in xml format), less implement time, hard to do comprehensive layout
  • back end, framework/engine providing a design tool to design and save the layout as a template, allowed to feed the data set(s) to template, to
  • back end, having a template excel in back end, read and copy the template then fill your data in the cell by row/column

For pdf

  • front end/back end, use javascript to call pdf api, create pdf components with coordinate (width, height, x, y), hard to handle comprehensive layout
  • front end, use canvas HTML element to capture the a specific area of screen in browser and print as a pdf
  • front end, use javascript to call browser print function to print your page as a pdf
  • back end, convert a excel to pdf
  • back end, convert html (maybe with limited css) to pdf

For excel manipulation read/write (xlsx, xls)

After the test, I rank the tool from 1 to bigger number, 1 is the most perferable.

  1. EPPlus5
  2. NPOI
  3. Jasper Report, Java based program, officia provide a c# wrapped for call, support xlsx, xls
  4. Crystal Report
  5. OpenXmlSDK

EPPlus, support xlsx

:white_check_mark: API is straight forward, easy to understand and use

:white_check_mark: implemented excel like behaviors, most advcanced features (chart, pivot table, header, footer, print number, cell validation..etc)

:white_check_mark: really love the copy and paste function to repeating the table body (include fonts, styles, formula)

:x: no free lunch (license required for commercial use)

NPOI, support xlsx, xls

Apache POI, the Java API for Microsoft Documents. read and write MS Excel, Word and PowerPoint files using Java, also Outlook, Visio, publisher. NPOI it is a .Net wrapper of POI. I did not test NPOI, but I had used POI (not include pivot table) in java before.

:white_check_mark: Nothing to comment for a really free and rich features tool on read/write excel. But please be remind below

:x: check supported Excel formula functions https://poi.apache.org/components/spreadsheet/eval-devguide.html

OpenXmlSDK, support xlsx

I would said, don't use this if you still have a choice

microsoft provides basic API, required to read dehumanized, complex, extremely long documentation. They really don't want you learn it then people stop paying for MS Office.

:white_check_mark: high compatibility, because its native born from MS

:x: the productivity tool like a kind of reverse engineering stuff, very time-consuming even modify a cell / column / row / sheet in a current code

https://stackoverflow.com/questions/9004848/working-with-office-open-xml-just-how-hard-is-it

:x: lack of pivot table customization features

:x: unable to encrypt Excel (you never get it, by Design, Open XML SDK does not work like this)

https://learn.microsoft.com/en-us/answers/questions/286270/can-we-protect-excel-workbook-with-password-using

Crystal Report, support xlsx, xls, pdf

:white_check_mark: good for pdf generation, most test result are positive in

  • 1.1 Common Content and Features
  • 1.2. Advanced features :white_check_mark: seems able to embed fonts in pdf (i did not test)

:x: unable to encrypt xlsx, xls, pdf

:x: bad for excel generation

because of the design, for details please read below 4 Urls

https://archive.sap.com/documents/docs/DOC-39608

https://userapps.support.sap.com/sap/support/knowledge/en/1198296?fbclid=IwAR0_KR9veTxUJG_LituJlLSBYrvG6BZN3_OUm-JEZSiFa9enoZp-Jysa54Q

https://answers.sap.com/questions/424754/how-to-merge-columns-when-exporting-crystal-report.html?fbclid=IwAR0WjV8zsw_6Fd5OG3s-BNCyzbVuYToHD1xCMIgh0O1mNRFIqbEXSCrlcUA

https://stackoverflow.com/questions/28045209/can-grow-proprity-of-a-crystal-report-field-doesnt-push-down-lines-correctly?fbclid=IwAR2KEHM-rtmA-FHfun3NrsS_rDZLdVotuiy-14u_u7ih7vbgcjLsUoGQejA

For pdf manipulation write

After the test, I rank the tool from 1 to bigger number, 1 is the most perferable.

  1. puppeteer/puppeteer, PejmanNik/puppeteer-report
  2. Crystal Report
  3. iText7
  4. Jasper Report