report - 从多选轴中检索报告中的记录
问题描述
我有一个关于如何将我在表单中选择的记录检索到报告的问题。
目前,我可以选择多条记录,但是当涉及到报告时,它会继续处理相同的值。但是它处理的记录数是正确的,只有值是重复的。
我不确定如何解决此问题,因此非常感谢您的帮助。
以下是我得到记录的部分:
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
模式。
推荐阅读
- collections - 如何通过结构相等性检查结构集合中的结构?
- java - Java:如果枚举常量本质上是静态的,那么枚举常量如何具有与其关联的构造函数和方法
- python - 了解特定的 Python 列表理解
- java - 将 2 个微调器值从活动发送到另一个
- c++ - (int)num/2.0 和 (int)(num/2.0) 之间的区别
- php - PHP:除了第一个表单之外,多个表单都不起作用?
- google-maps - 创建特定街道获得特定颜色的自定义地图
- python - 在 PyQt5 中获取滚动条拇指的大小/宽度?
- c++11 - __int64' 后跟 'int64' 是非法的
- dart - Flutter 获取列表值到另一个列表