How to attach a RD as an attachment in an email in pega?

How to attach a RD as an attachment in an email in pega?

There are multiple ways based on the requirement.

  1. If you want an automatic time to time email:
  1. If you need it on demand during case processing :
    a. You can put your report in a section rule use pxCreatePDF to create a PDF from that section and send it as an email with attachment.
    b. You can use pxRetrieveReportData in an activity to fetch the report on to a page and convert it to a an excel file by having an excel template in place already in the system using pxGenerateexcelfile. This will place it in service export path, then get the stream from there and attach it to the email. You can refer the below links to achieve this.

You can also schedule reports both in Constellation and Traditional apps - this would send a report in an email?