Extend Jasper Engine

From iDempiere en
Jump to: navigation, search


Case study

Want to run a report per user, protect pdf file by password and sent email to user

Implement

fire event when setting configuration for export pdf by IDEMPIERE-3857:fire event on jasper engine

add more parameter to report need customize (apply password)

at event handle, get parameter and apply setting to configuration

done, just sent email

Test

  • define report "Salary Report" (already done by 2Pack)
PayrollReport.png

this report receive parameter Staff_ID to query info relate that staff and generate report for him/her

  • define process "Sent Salary Email" (already done by 2Pack)
SentSalaryEmail.png

this process point to tw.idempiere.jasperreport.extend.osgi.service.SentMailPayrollToStaff

  • parameter meaning

Remember: change "Mail Receive Test" value to yours

  • Open user window and set value of "Mail Receive Test" for "EMail Address" of some users
  • run process "Sent Salary Email" with tick and un-tick "Encrypted"