Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jasper reports and replace with PHPWord/libreoffice #1341

Merged
merged 6 commits into from
Dec 14, 2020

Conversation

jpwhite4
Copy link
Member

Description

Switch to using PHPWord to generate the reports. This outputs reliably in Word doc format, but the pdf format is lacking so LibreOffice is used to generate the pdf outputs.

This change attempts to produce visually identical reports as before, although the internal file layout is changed. The Jasper reports stuff used one giant table per page. This causes word to report errors when trying to print the report and also causes problems with chart images being truncated when there are long subtitle strings. This version uses the header and footer of the doc (the Jasper reports just has a table row at the top and one at the bottom). The layout is done using paragraph styles so the output word doc is actually easily editable.

The report generation for word docs is significantly faster on my docker instance. The pdf export seems to be about the same.

Motivation

This backend should give us the flexibility to easily produce advanced reports that include tabular information and are not just limited to 1/2 charts per page.

The hardcoded layout stuff is all in the Reports/ClassicReport.php class. The idea would be to keep this around for the time being then deprecate it when we have the improved reporting infrastructure,

@jpwhite4 jpwhite4 added this to the 9.5.0 milestone Jun 17, 2020
@jpwhite4 jpwhite4 added Category:Report Generator Report Generator maintenance / code quality Improvements and code cleanup. Not a new feature or enhancement to existing functionality. labels Jun 17, 2020
@jpwhite4 jpwhite4 force-pushed the reports branch 2 times, most recently from d721bdc to f824192 Compare June 17, 2020 21:06
@plessbd plessbd changed the title Remove jasper reports and replace with PHPWord/libreoffice ** 9.5 ** MILESTONE Remove jasper reports and replace with PHPWord/libreoffice Jul 24, 2020
@plessbd plessbd mentioned this pull request Aug 13, 2020
6 tasks
Copy link
Contributor

@plessbd plessbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of me also wants to see if we can find something a little "smaller" than libreoffice to do the doc to pdf conversion. Since libreoffice brings in A LOT more, but that can also be done at a future date.

@@ -15,7 +15,7 @@ Requires: httpd
Requires: mariadb >= 5.5.3
Requires: php >= 5.4 php-cli php-mysql php-pdo php-gd php-xml php-mbstring
Requires: php-pear-MDB2 php-pear-MDB2-Driver-mysql php-pecl-apcu
Requires: java-1.8.0-openjdk java-1.8.0-openjdk-devel
Requires: libreoffice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to libreoffice-writer

@jpwhite4 jpwhite4 changed the base branch from xdmod9.0 to xdmod9.5 August 18, 2020 20:52
@jpwhite4 jpwhite4 merged commit 1c325d7 into ubccr:xdmod9.5 Dec 14, 2020
@jpwhite4 jpwhite4 deleted the reports branch December 14, 2020 14:47
@jpwhite4 jpwhite4 added dependencies Pull requests that update a dependency file and removed maintenance / code quality Improvements and code cleanup. Not a new feature or enhancement to existing functionality. labels Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Report Generator Report Generator dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants