28.03.2006, 14:59 | #1 |
Участник
|
Есть запрос. Он содержит значения выбранные пользователями. Пишу код
Код: //ЗАПРОС ПО ТАБЛИЦЕ ДОКУМЕНТОВ ГК qbdsLT = this.query().dataSourceTable(tablenum(LedgerTrans)); qryLT = new Query(); qbdsLT = qryLT.addDataSource(tablenum(LedgerTrans),'lbdt2'); //аналитика for (idx=1; idx <= dimof(dimension); idx++) { qbrLT = qbdsLT.addRange(fieldId2Ext(fieldnum(LedgerTrans,Dimension),idx)); dimension[idx] = element.query().dataSourceTable(tablenum(LedgerTrans)).findRange(fieldId2Ext(fieldnum(LedgerTrans,Dimension),idx)).value(); qbrLT.value(dimension[idx]); } qrunLT = new QueryRun(qryLT); Код: while (qrunLT.next()) _ledgerTransQ = qrunLT.getno(1); { while select * from _ledgerTrans where ((_ledgerTrans.Voucher == _assetTrans.Voucher)&& ((_ledgerTrans.AccountNum >= fromAccountNum )&& (_ledgerTrans.AccountNum <= toAccountNum))) { if ((_assetStandards.Dimension[1] like _ledgerTransQ.Dimension[1])&& (_assetStandards.Dimension[2] like _ledgerTransQ.Dimension[2])&& (_assetStandards.Dimension[3] like _ledgerTransQ.Dimension[3])&& (_assetStandards.Dimension[4] like _ledgerTransQ.Dimension[4])&& (_assetStandards.Dimension[5] like _ledgerTransQ.Dimension[5])&& (_assetStandards.Dimension[6] like _ledgerTransQ.Dimension[6])&& (_assetStandards.Dimension[7] like _ledgerTransQ.Dimension[7])&& (_assetStandards.Dimension[8] like _ledgerTransQ.Dimension[8])) { |
|
28.03.2006, 16:24 | #2 |
Участник
|
Вопрос закрыт.
|
|