从多选ax中检索报告中的记录
Retrieve records in report from multiple selection ax
我有一个关于如何将我在表格中 select 编辑的记录检索到报告的问题。
目前,我可以select 多条记录,但是当涉及到报告时,它会继续处理相同的值。但是它处理的记录数是正确的,只有值是重复的。
我不确定如何解决这个问题,因此非常感谢您的帮助。
以下是我得到记录的部分:
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;
}
}
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
也使用这种模式。
我有一个关于如何将我在表格中 select 编辑的记录检索到报告的问题。
目前,我可以select 多条记录,但是当涉及到报告时,它会继续处理相同的值。但是它处理的记录数是正确的,只有值是重复的。
我不确定如何解决这个问题,因此非常感谢您的帮助。
以下是我得到记录的部分:
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;
}
}
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
也使用这种模式。