Hello TogetherI am looking for a code example for exporting a reportbook and sending it via the application engine.The goal is to replace a task of version 11 with it.Can someone help me here?already many thanks
Daniel
Hello Daniel,
here an example for an AppEngine script that we use to send report books. If you want to use it wou have to have at least version 2022.08.
Best regards, Daniela
#define EngineVersion 5.0 #define RuntimeVersion 5.0 bool ExportReportBookPDF()@Description: "Export report book as PDF and send mail";@Category: "Mailing";@Returns: "Always true"; { BookExportResult result = ExportReportBook("name_of_application", "name_of_report_book", BookExportOutputType.Pdf, false, BookExportImageType.Png); BinaryData bd = result.GetBinaryData(); // BookExportResultGetBinaryData(result); string fileName = result.GetFileName(); // BookExportResultGetFileName(result); VariantDictionary attachment = CreateVariantDictionary(); attachment[fileName] = bd; MailServer myserver= MailerDefineCloudServer(); MailerSendMail(myserver, "recipient1@domain.com","recipient2@domain.com" , "mail_subject", "mail_body_text", attachment); return true; }
Hello DanielaThank you very much. That already helps a lot.Do you use it to send a reportbook that generates multiple reports via a combobox?
Hi Daniel, just wanted to give you a heads-up here that November release will bring features to update report book parameters with the new set of Application Engine functions. Hope this will make the migration process easier and as always - would be great to hear feedback on how you are adopting these features.
Hello Nick
That would be great. I think I found a workaorund. by using custometting and a database query to select the elements. But I am waiting excitedly for the November release
we send several reports whithin one report book, but we just add the reports which we want to send directly to the report book (and don't use a combobox for the selection).
Hallo Daniela
Thank you. I found a workaround, so I can send the same reportbook to different user with different contents.
Best regards, Daniel
Hi all,
here are New Sources available for the export of reportbooks.Happy to get your experience and feedback!
Peter
Hi all, just added new sources for the reportbook export extension. Link stayed the same! Enjoy!