E-Mail reports as pdf

KaetchenKaetchen Member Posts: 106
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

Comments

  • sggsgg Member Posts: 109
    I think what you should do is simply to Select the PDF Printer from the available List of Printers whenever you want to print to PDF in the Print Dialog Box.

    Thereafter, you could attach the PDF file to your e-mail and then send.
    Sunday, Godwin G
  • KaetchenKaetchen Member Posts: 106
    Unfortunately I can't choose a printer as the program distributes the e-mails direct to the novell groupwise server and sends them off.

    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,
  • fredefrede Member Posts: 80
    I don't know if it is the same printerdriver - but we use the following commands:

    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.
    Regards,

    Henrik Frederiksen, Denmark
Sign In or Register to comment.