Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Email report in HTML and PDF

  1. #1
    Join Date
    Mar 2009
    Posts
    205

    Default Email report in HTML and PDF

    I have an Xaction that runs two reports.

    - A summary reports with output as table/html
    - A detailed report with output as PDF

    both report "use content repository"

    I then send an email that contains both reports. The summary as html in the body and the detailed as a pdf attachment.

    It works great if I run this Xaction from the user console. I get the summary report embedded in my email body and an attachment containing the pdf.

    If I schedule this report with a private schedule in pentaho, I receive an email with the pdf as an attachment but the body of the email contains also the pdf report that the email client tries to display as html (it looks like garbage but I can see some pdf codes among that binary data)

    Any ideas what couls cause the different behavior between running it from the console and from the scheduler ?
    Last edited by haubuchon; 07-13-2010 at 02:06 PM.

  2. #2
    Join Date
    Mar 2009
    Posts
    205

    Default

    It seems to be related to background vs foreground execution. output files are not stored in the same location in the content repository (system/content folder).

    With my 2 reports, i use "contentrepo" for the output destination. Two files are created with a random name like:

    content/htmlOutput/976756a9-8df5-11df-80b0-dbb647339bf1
    content/pdfOutput/976756a9-8df5-11df-80b0-dbb647339bf1

    When this xAction is ran in background, the repository output names are overriden with

    content/background

    Since both files have the same name, the first report ouptut is overwritten by the second.

    - How is this random filename is generated and can I have two different one ?
    - Why are the original content folders are oweridden with background and can I disable this ?


    Any hints ?
    Last edited by haubuchon; 07-12-2010 at 04:50 PM.

  3. #3
    Join Date
    Mar 2009
    Posts
    205

    Default

    I found a solution after searching through code ...

    instead of using a output destination of type "contentrepo" for my two outputs, I use a destination type "file" with names like

    contentrepo:htmlOutput

    contentrepodfOutput

    The output is not replaced with "background" and I can have two different reports in the same xAction.

  4. #4
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  5. #5
    Join Date
    Sep 2015
    Posts
    1

    Default

    Hi Haubuchon,

    I have the same requirement as you, to send two reports, one as HTML in email body and other as excel attachment.
    Can you please share the Xaction file or the steps to accomplish this from Pentaho User console scheduler?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.