Question:
How do I set default values in Notification tab of report scheduler?
Answer:
Please note the solution below verified with TIBCO JasperReports® Server v.6.1.1
Default values for Notification tab can be setup in a Javascript file:
jasperserver-proscriptsbower_componentsjrs-uisrcschedulermodeljobModel.js
Add the following code after repositoryDestination: {.....} model definition (line ~1465):
mailNotification: { toAddresses: { address: ['JohnSmith@mail.com', 'BobSmith@mail.com'] }, ccAddresses: { address: ['RedGreen@mail.com'] }, bccAddresses: { address: ['BlueJack@mail.com'] }, subject: 'Ouptut Job - Year Sales', messageText: 'See attached...', skipEmptyReports: true, includingStackTraceWhenJobFails: false, skipNotificationWhenJobFails: false, resultSendType: 'SEND_ATTACHMENT' // SEND, SEND_EMBED, SEND_EMBED_ZIP_ALL_OTHERS, // SEND_ATTACHMENT, SEND_ATTACHMENT_ZIP_ALL }, alert: { recipient: 'OWNER_AND_ADMIN', // NONE, OWNER, ADMIN, OWNER_AND_ADMIN jobState: 'ALL', // NONE, ALL, FAIL_ONLY, SUCCESS_ONLY subject: 'Year Sales Job Status', messageText: 'Successful run.', messageTextWhenJobFails: 'Job Output failed.', includingStackTrace: true, includingReportJobInfo: true, toAddresses: { address: ['statusForAdmin@mail.com'] } }
You need to replace dummy values with your custom ones.
Please note that by default JasperReports Server uses so-called optimized scripts.
In order to test the changes you can add _opt=false parameter to URL to make the server uses non-optimized scripts:
http://localhost:8080/jasperserver-pro/flow.html?_flowId=searchFlow&_opt=false
If the changes meet your requirements, you should regenerate optimized scripts as described in JasperReports Server guide:
See also:
How to Automatically Enable and Configure FTP properties in Scheduler 'Output Options' tab
Ref. Case #00065543
Recommended Comments
There are no comments to display.