Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Formatting Email body with images

    Posted Fri June 09, 2023 12:22 PM

    Hi All,

    Is it possible to insert images such as a company logo into the email body of a schedule in Cognos?.

    When the recipient receives the email the image, should be visible.

    Best Regards, 



    ------------------------------
    Mack L
    ------------------------------


  • 2.  RE: Formatting Email body with images

    Posted Mon June 12, 2023 02:33 AM

    Hi Mack, 

    If your scheduled output is HTML, the content of the report is embedded into the mail body. So, you can include your logo in the report and schedule the output in html format. 

    Regards,
    Kiran



    ------------------------------
    Kiran Passumarthi
    www.linkedin.com/in/kiranpassumarthi
    ------------------------------



  • 3.  RE: Formatting Email body with images

    Posted Mon June 12, 2023 05:13 AM
    Hi Mack, 
     
    I didn't try it, but I assume you could even give your email body a totally different layout by differing HTML format (for the email body) from PDF/Excel format (for the email attachment) with a conditional style or block ( ReportOutput() = HTML ). 
     
    Kind regards, Philipp


    ------------------------------
    Philipp Hornung
    Business Intelligence Manager
    Techniker Krankenkasse
    Hamburg Germany
    #IBMChampion
    ------------------------------



  • 4.  RE: Formatting Email body with images

    Posted Mon June 12, 2023 08:52 AM

    Hi Kiran,

    Thank you. In this case, the output is XL format. Is there still a way to embed an image into the email body?

    Best Regards,



    ------------------------------
    Mack L
    ------------------------------



  • 5.  RE: Formatting Email body with images

    Posted Mon June 12, 2023 08:58 AM

    Hi Mack, 

    You can select both outputs in the schedule. HTML will be embedded in the mail body and excel will be send as an attachment. If the content should be different in excel and the mail body, then you can use ReportOutput() function and apply conditional style in the report so that whatever is applicable to show for ReportOutput()='HTML' in the conditional style will display in the mail body and ReportOutput()='Excel' (or whatever is the value for excel. pls check the documentation for the exact string to check for) will display in the attachment. 

    Regards

    Kiran



    ------------------------------
    Kiran Passumarthi
    www.linkedin.com/in/kiranpassumarthi
    ------------------------------



  • 6.  RE: Formatting Email body with images

    Posted Tue June 13, 2023 03:06 AM
    Edited by Marc Reed Wed June 14, 2023 02:16 AM

    Kiran's answer is the right one for this problem. 

    You can create render variables for different pages in the report. Have one page that is the email body content. This page should have a render variable that is only true for HTML outputs. And then on the actual report pages have a render variable that is true for XL output.  

    The only caveat with this technique is bursting. For some strange reason burst reports will always email multiple output formats in different emails (EDIT) when the ReportOutput function is used.. No idea why. But in this example, if the report was run normally you would receive an single email with both HTML and XL outputs in the single email. If it was burst you would receive an email for the html and then a second email for xl. No idea why the product works this way for bursting.

    (And if you have anyone is wondering how to acheive the same thing when bursting is required - EventStudio to the rescue!)



    ------------------------------
    Marc Reed
    ------------------------------



  • 7.  RE: Formatting Email body with images

    Posted Wed June 14, 2023 11:31 AM

    Hi Marc, 

    Thank you. The problem is that the scenario I am working on involves bursting and not simple email delivery. Since you have mentioned Event Studio to avoid the problem of multiple emails (one for each format) when the report is bursted, could you please throw some light on how I can achieve what I want (html content for email  body and XL attachment which Kiran explained) using Event Studio? I think Event Studio triggers email based on a condition while I just want to schedule the burst report on a particular day (say second Thursday) every month.

    Best Regards,



    ------------------------------
    Mack L
    ------------------------------



  • 8.  RE: Formatting Email body with images

    Posted Wed June 14, 2023 11:43 AM
    I think what Marc was alluding to is the ability to customize the body of the email like you were trying to achieve in Report Studio that renders the HTML output in the body. If you go into Event Studio you can toy around with the Send Email action that comes after whatever triggers in Event Studio you create. You can then have Event Studio attach the output of your Excel to the email. Event Studio has the option for bursting as well. 

    Logan Whitaker

    PMO, HEB Supply Chain Planning & Operations

    o: 210.938.6043 m: 210.429.3181

    e: whitaker.logan@heb.com







  • 9.  RE: Formatting Email body with images

    Posted Thu June 15, 2023 03:09 AM

    You may want to double check that there is still the limitation of Bursting out multiple formats before you investigate Event Studio further.  

    Again - caveat, I last did this in early versions of 11 so it may not be a limitation!

    Just to recap, and for any others contributing to this thread...

    If your report creates different outputs for XL,HTML,PDF - when you burst these different outputs are sent in separate emails. This is different to standard functionality that Cognos will combine the different outputs into a single email.

    I tried all sorts of tricks but alas couldn't get a simple burst to only send one email.  

    However, Event Studio stepped up! You can use Event Studio to combine the outputs from mutiplle bursts into a single output. And that doesn't mean using Event Studio to write the email content. You can still use the same trick of a HTML report creating the email content.  

    It's quite a convoluted task but it looks like others have already written this technique up.  

    Here is the first one i found using Dr Google...

    https://studylib.net/doc/7641911/batching-of-burst-report-output-for-delivery-by-email-usi...



    ------------------------------
    Marc Reed
    ------------------------------



  • 10.  RE: Formatting Email body with images

    Posted Wed June 14, 2023 01:24 PM

    I wrote an article describing exactly how to do this.

    https://cognospaul.com/2017/02/21/3-reports-1-email/

    Basically you define report layouts, for each format you want. If you attach HTML to the schedule but leave the body completely blank (make sure there isn't even a space) Cognos will automatically use the HTML output as the email body. Design that as needed.



    ------------------------------
    Paul Mendelson
    ------------------------------