Message of the Day

I have been going through all the operational documents (ie invoices, receipts etc) adjusting them for Hong Kong. It struck me that the macro:eval facility in 1.7 makes it easy and convenient to add a message of the day facility.

First add a field [macro:eval("@mod_invoice")] to the invoice jrxml (and [macro:eval("@mod_paymentReceipt")] to the payment one, etc etc for the other documents).

Then create the following macros:

As you can guess the 'normal' setup is to set the 'document' macros either to just $mod_message, or something with this concatenated (see the paymentReceipt).

You can then quickly change the standard mod_message, either by altering its expression text, or setting it to invoke another message - eg by setting the expression to simply $mod_newyear. Hence operational staff can change the message of the day without having to know how to fiddle with the jrxml files.

As you can guess some of the above are set for testing (to make sure that multiple lines were handled correctly) rather than for operational use.

Regards, Tim G

Syndicate content