Skip to content

OpenLMIS-Angola/angola-reports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenLMIS Angola Reporting Service

Service for managing and printing reports for Angola OpenLMIS implementation.

Updating reports to database

  1. Build report in Jaspersoft Studio application to have .jasper file.
  2. Go to reports
 cd reports/
  1. Create hex file of created jasper file.
xxd -pxxd -c 999999999 <report_file_name>.jasper > <report_file_name>.hex 
  1. Go back to main repository.
cd ..
  1. Create migration file
gradle generateMigration -PmigrationName=<migration_name>

example migration name update_<field>_<reportName>

  1. Edit migration file and make sure it will be added to the changes with new commit
UPDATE reports.jasper_templates
SET data = '\xHEX'
WHERE id = 'report-uuid';

HEX is exactly, what have you generated in step 3.
report-uuid you should know the uuid or take it from database

  1. Commit your changes, make sure that migration and updated <report_name>.jrxml are added.
  2. Push and create Pull Request.