首页 > 解决方案 > 从多选轴中检索报告中的记录

问题描述

我有一个关于如何将我在表单中选择的记录检索到报告的问题。

目前,我可以选择多条记录,但是当涉及到报告时,它会继续处理相同的值。但是它处理的记录数是正确的,只有值是重复的。

我不确定如何解决此问题,因此非常感谢您的帮助。

以下是我得到记录的部分:

if (element.args() && element.args().dataset())
{
    switch(args.dataset())
    {
        case tablenum(LedgerJournalTrans) :
            ledgerJournalTrans = element.args().record();
            info(ledgerJournalTrans.Voucher);
            break;    
        case tablenum(LedgerJournalTable) :
            ledgerJournalTable = args.record();
            break;
    }    
}

标签: reportaxapta

解决方案


element.args().record()唯一指向最后选择的记录。它的数据源来救援。处理多选记录的常用方法适用于:

Common record;
FormDataSource fds;
fds = element.args().record().dataSource();
for (record = fds.getFirst(1) ?  fds.getFirst(1) : fds.cursor(); record; record = fds.getNext())
{
     // Do the printing using record
}

您经常会在main能够处理多选记录的函数方法中看到这种方法。

也使用这种FormLetter.getFormRecord模式。


推荐阅读