Hi @TatKkkkkR,
There is no standard mpm in the baseline to generate reports/attachments and then attach it to a desired table (as per your example, task_attachment table). The baseline mpm perform_attach_report_pdf is available but unfortunately the issue is that there is no parameter to choose where to attach the generated report. If the perform_attach_report_pdf result returns the attachment path and the attachment name in the xml, then you could have simply attached that report via xpath by updating the task_attachment table with a XML BR.
Therefore as the above set up is not likely to happen, you may need to write a simple customization by invoking the baseline PrintReportManager class to get the generated report path + report name. Then using the report path and name you can simply update the task_attachment table.
Thank you @Saranga Amaraweera