合并多个Dynamic AX报告 [英] Merge several dynamics AX reports in one
问题描述
我有以下问题: 我想将salesInvoice报表合并到1个包含所有发票的报表中.
I have the following problem: I want to merge salesInvoice reports in 1 report containing all invoices.
我正在使用打印带有printJobSettings,Args和reportRun类的报告的作业.我的参数是ledgerJournal num,我想在一个报表中打印所有相对发票,而不是分别打印每个发票.
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?
基本上,我从LedgerJournalTrans表中获取JournalNum,在CustInvoiceJour表上循环以获取所有相对发票并执行报告,我认为我应该重写fetch方法来执行此操作,但是salesInvoice报告中的fetch方法非常安静,我不知道不想丢失信息.
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.
推荐答案
您可以调用CustInvoiceJour
表的printJournal
方法.作为第二个参数,为您要打印的发票RecordSortedList
.
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.
您还将需要一个SalesFormLetter
对象作为第一个参数,并填充相关的printJobSettings
.
You will also need a SalesFormLetter
object as the first argument, populated with relevant printJobSettings
.
由于element.reset()
调用将报表最终确定为打印作业,因此您很可能必须更改fetch
方法.如果输出是要发送到PDF或邮件,那就不好了.
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.
您很有可能可以将element.reset
更改为:
Most likely you can change element.reset
to:
element.newPage();
element.page(1);
这将使页面分页并重置页面计数器.一个警告:pageTotal
方法将不会重置,因此第1页(共7页)"将不起作用.
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.
这篇关于合并多个Dynamic AX报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!