Đây là giải pháp tôi đã sử dụng cho sự cố này;
Hai phương pháp trên báo cáo để khi các trường được chọn nhiều trên biểu mẫu, các giá trị được chuyển đến hộp thoại bộ lọc;
private void setQueryRange(Common _common)
{
FormDataSource fds;
LogisticsControlTable logisticsTable;
QueryBuildDataSource qbdsLogisticsTable;
QueryBuildRange qbrLogisticsId;
str rangeLogId;
set logIdSet = new Set(Types::String);
str addRange(str _range, str _value, QueryBuildDataSource _qbds, int _fieldNum, Set _set = null)
{
str ret = _range;
QueryBuildRange qbr;
;
if(_set && _set.in(_Value))
{
return ret;
}
if(strLen(ret) + strLen(_value) + 1 > 255)
{
qbr = _qbds.addRange(_fieldNum);
qbr.value(ret);
ret = '';
}
if(ret)
{
ret += ',';
}
if(_set)
{
_set.add(_value);
}
ret += _value;
return ret;
}
;
switch(_common.TableId)
{
case tableNum(LogisticsControlTable):
qbdsLogisticsTable = element.query().dataSourceTable(tableNum(LogisticsControlTable));
qbrLogisticsId = qbdsLogisticsTable.addRange(fieldNum(LogisticsControlTable, LogisticsId));
fds = _common.dataSource();
for(logisticsTable = fds.getFirst(true) ? fds.getFirst(true) : _common;
logisticsTable;
logisticsTable = fds.getNext())
{
rangeLogId = addrange(rangeLogId, logisticsTable.LogisticsId, qbdsLogisticsTable, fieldNum(LogisticsControlTable, LogisticsId),logIdSet);
}
qbrLogisticsId.value(rangeLogId);
break;
}
}
// này thiết lập các truy vấn và nhận được giá trị chuyển chúng tới các phạm vi ie "SO0001, SO0002, SO000 £ ...
Các phương pháp thứ hai là như sau;
private void setQueryEnableDS()
{
Query queryLocal = element.query();
;
}
Ngoài phương pháp init, điều này là bắt buộc;
public void init()
{
;
super();
if(element.args() && element.args().dataset())
{
this.setQueryRange(element.args().record());
}
}
Hy vọng điều này sẽ giúp trong tương lai cho bất kỳ ai khác có vấn đề tôi có.
Cảm ơn bạn Michael, tôi đánh giá cao sự giúp đỡ của bạn và sẽ bắt đầu làm việc về vấn đề này ngay lập tức. – will