how do you set a scheduled task that sending a summary report defined in report defintiion every night in HTML(don't prefer attachments)?
I have no idea how to do this
It might be possible to use a custom HTML template with the "$SCRIPT()" tag to run an AppScript. This script would have to do all the work of reading the data and formatting the output using HTML. It could be a lot of work just to get an HTML email. You'd have to really really hate Excel or PDF attachments. No guarantees. I've never tried the "$SCRIPT()" tag in a scheduled report template.
Paul Thompsonmore than a month agoI was curious to see if this would work so I did a couple tests ... the "$SCRIPT()" tag works when it's in the template selected in the report definition, but this isn't where you would want it ... it's output would be captured by the PDF or excel. You want to use "$SCRIPT()" in the template specified in the "Email Template" in the Scheduled Report "Advanced Options". It does not work in that context. Here's the error I got:
ERROR QuartzScheduler_Worker-8 2017-01-26 22:25:10,470 [com.serena.sbm.ns.templates.FileTemplate] -- Attempted to use tag SCRIPT, but it is not registered.
ERROR QuartzScheduler_Worker-8 2017-01-26 22:25:10,470 [com.serena.sbm.ns.templates.FileTemplate] -- failed to render tag "SCRIPT" with parameters "[scheduled_report_test_script, $REPORT_NAME(]" for
My next thought would be to try the SBM 11.2 "JSON API" calls. That will be left as an exercise for the reader as my physics prof used to say.
Accepted AnswerGerard PinzoneOffline0The way I did something like this was to write a program that did a SQL query and take the output and send an email with the results. It doesn't leverage SBM in any way, but it produces very nice HTML emails.
In case anyone was wondering, the method Paul Thompson was talking about uses Work Center and is part of SBM. Much easier to implement, but the results are only available as an attachment Excel file rather than in the body of the email.