Merge several dynamics AX reports in one

那年仲夏 提交于 2019-12-01 13:13:59

问题


I have the following problem: I want to merge salesInvoice reports in 1 report containing all invoices.

I'm using a job that prints reports with printJobSettings, Args and reportRun classes. My parm is a ledgerJournal num and I want to print all relative invoices in one report not printing each invoice separately.

How can I do to generate only one report?

Basically, I take my JournalNum from LedgerJournalTrans Table, I loop on CustInvoiceJour table to have all relative invoices and execute report, I think I should override fetch method to do this, but fetch method on salesInvoice report is quiet heavy and I don't want to loose information.


回答1:


You can call the printJournal method of the CustInvoiceJour table. As the second argument give it a RecordSortedList of the invoices you want to print.

You will also need a SalesFormLetter object as the first argument, populated with relevant printJobSettings.

You will most likely have to change the fetch method as the element.reset() call finalizes the report as a print job. This no good if the output is going to a PDF or mail.

Most likely you can change element.reset to:

element.newPage();
element.page(1);

This will make a page break and reset the page counter. One caveat: pageTotal method will not be reset, so "Page 1 of 7" will not work.



来源:https://stackoverflow.com/questions/10225296/merge-several-dynamics-ax-reports-in-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!