Показать сообщение отдельно
Старый 28.04.2008, 19:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
gatesasbait: Automatic creation of a PDF from a customer invoice in Dynamics Ax 4.0
Источник: http://gatesasbait.spaces.live.com/B...B9F5!223.entry
==============


Good morning,

The following code snippet will create a PDF from a CustInvoiceJour record, without any user intervention, using only the standard Ax4 EPSendDocument class.

X++:
public static void EPSendDocumentTest(Args _args)
{
    EPSendDocument sendDocument;
    CustInvoiceJour custInvoiceJour;
    Filename filename;
    ;
 
    select firstonly custInvoiceJour;
 
    filename = WinAPI::getTempPath() +'MyInvoice.pdf';

    sendDocument = new EPSendDocument(custInvoiceJour);
    sendDocument.parmOriginal(true);
    sendDocument.parmFileName(filename);
    // Make document will run the report and send it to a PDF file with
    // the path specified in filename
    sendDocument.makeDocument();
}
The file should end up in C:\DOCUME~1\***\LOCALS~1\Temp\MyInvoice.pdf on Win32 installations. I found this while looking at EP weblet 'EPDocuGetWeblet'. The EPSendDocument class supports a lot of other standard reports, such as quotations, etc.


Источник: http://gatesasbait.spaces.live.com/B...B9F5!223.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.