Hi,
I know this issue is discussed several times...
but I have no experience with C/AL.
Our report splits already the e-mail/non-email users and uses the e-mail address in the customer card.
All great, but then it creates an awful HTML report.
We have PDFPrinter and PDFEdit.
How can I change the code to print to pdfprinter instead creating an html.file?
Does anyone has example codes? That would be very much appreciated.
Thanks,
Kaetchen
0
Comments
Thereafter, you could attach the PDF file to your e-mail and then send.
Technically this all is fine apart from the layout, the filename and the fact that there is no message on the e-mail except the subject and the attachment.
I appreciate that this forum might not cover those questions, but I saw some time ago a mibuso forum only for PDF.
Does someone know it?
Thanks,
PDFDestEnable := '%%DestEnablePostAction: False%%';
PDFTitle := '%%Title: Invoice '+SalesInvoiceHeader."No."+'%%';
PDFFilePath := '%%FilePath:Z:\inv\'+SalesInvoiceHeader."No.".PDF%%';
EmailEnable := '%%EmailEnable: True%%';
EmailSendMethod := '%%EmailSendMethod: 0%%';
EmailTo := '%%EmailTo: '+SalesInvoiceHeader."E-mail"+'%%';
EmailFrom := '%%EmailFrom: '+SalesPerson.Email+'%%';
EmailSubject := '%%EmailSubject: Invoice '+SalesInvoiceHeader."No."+' from Company X.%%';
PDFDestEnable, PDFTitle and so on is created as normal text variables in the report.
You can enable the printerdriver to detect and hide those commands - which is printed as "normal" fields in the top of the first page (all fields are just placed on top of each other) in a new header.
Henrik Frederiksen, Denmark