Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to Configure Default Values in Scheduler Notification Tab


    asimkin
    • Features: Scheduler Version: v6.1.1 Product: JasperReports® Server

    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 

    JobNotifications_DefaultValues.png.56714b47478d7592497e7fbcba4e557d.png

    If the changes meet your requirements, you should regenerate optimized scripts as described in JasperReports Server guide: 

    http://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v561/customizing-javascript-files


    See also: 

    How to Automatically Enable and Configure FTP properties in Scheduler 'Output Options' tab


    Ref. Case #00065543

    JobNotifications_DefaultValues.png.fb47231ad93866c5438900d5f249f3e2.png


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...