Sending summary reports every night

0
Hi All,
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

Thanks,
Derek

Accepted Answer

Thursday, January 26 2017, 10:29 PM - #Permalink
0
A scheduled report would be the natural way to do it, but by default it's going to send the report output as an Excel file or PDF.

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.
  • Derek Lauw
    more than a month ago
    Nice idea.... maybe i can chat with the user and decide whether Excel or PDF attachment is pausible.
  • Paul Thompson
    more than a month ago
    I 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
    template "sr_scheduled_report_with_SCRIPT.htm"


    Darn.
    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.
The reply is currently minimized Show
Responses (1)
  • Accepted Answer

    Sunday, January 29 2017, 09:43 PM - #Permalink
    0
    The 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.
    The reply is currently minimized Show
Your Reply

Recent Tweets