Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: Problem when trying to print Original and copy of SalesInvoice toghether

$
0
0

OK.. here is one more update.

If I insert a delay in my code, the problem partially goes away. I've noticed that some fields in the report are zero, like totals. There is definately an overlapping issue.

this.PrintV2('FV453371',PrintCopyOriginal::Copy);
sleep(5000);
this.PrintV2('FV453371',PrintCopyOriginal::Original);
private void PrintV2(str 20 factura,PrintCopyOriginal _PrintCopyOriginal)
{
    args args = new args();
    CustInvoiceJour     custInvoiceJourLocal;
    SRSPrintDestinationSettings printSettings;
    SalesInvoiceController controller = new SalesInvoiceController();

    ;
    select * from custInvoiceJourLocal
        where custInvoiceJourLocal.InvoiceId == factura;

    args.record(custInvoiceJourLocal);
    args.parmEnum(_PrintCopyOriginal);
    controller.parmReportName(ssrsReportStr(SalesInvoice, Report));
    controller.parmArgs(args);

    // suppress the parameter dialog
    controller.parmShowDialog(false);

    // start operation
    controller.startOperation();
}


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>