while (qr.next())
{
bankAccountTable = qr.get(tableNum(BankAccountTable));
bankAccountTrans = qr.get(tableNum(BankAccountTrans));
if(bankAccountTable.OABcashAccount == NoYes::Yes)
{
select sum(AmountCur) from bankAccountTransLocal where bankAccountTransLocal.TransDate < fromDate &&
bankAccountTransLocal.AccountId == bankAccountTrans.AccountId;
closingBalance = bankAccountTransLocal.AmountCur;
currentRow ;
cell = null;
cell = cells.get_Item(currentRow, 1);
cell.set_Value(this.strDate(bankAccountTrans.TransDate));
cell = null;
cell = cells.get_Item(currentRow, 2);
cell.set_Value(bankAccountTrans.Voucher);
while select * from ledgerJournalTrans where LedgerJournalTrans.BankAccountId == bankAccountTable.AccountId
while select * from vendtrans where vendtrans.CompanyBankAccountId == bankAccountTable.AccountId
join vendTable where vendTable.AccountNum == vendtrans.AccountNum
while select * from custTrans where custTrans.CompanyBankAccountId == bankAccountTable.AccountId
join custTable where custTable.AccountNum == custTrans.AccountNum
if(vendtrans.Voucher == bankAccountTrans.Voucher)
{
cell = null;
cell = cells.get_Item(currentRow, 3);
cell.set_Value(vendtrans.AccountNum);
cell = null;
cell = cells.get_Item(currentRow, 4);
cell.set_Value(vendtrans.vendTableName());
cell = null;
cell = cells.get_Item(currentRow, 5);
cell.set_Value(Global::OAIGetDimensionDisplayValue(vendTable.DefaultDimension,"@OAB:OABBusinessUnitnew"));
cell = null;
cell = cells.get_Item(currentRow, 6);
cell.set_Value(vendTable.InventLocation );
cell = null;
cell = cells.get_Item(currentRow, 7);
cell.set_Value(enum2Str(vendTrans.TransType));
}
else if(custTrans.Voucher == bankAccountTrans.Voucher)
{
cell = null;
cell = cells.get_Item(currentRow, 3);
cell.set_Value(custTrans.AccountNum);
cell = null;
cell = cells.get_Item(currentRow, 4);
cell.set_Value(custTrans.custTableName());
cell = null;
cell = cells.get_Item(currentRow, 5);
cell.set_Value(Global::OAIGetDimensionDisplayValue(custTable.DefaultDimension,"@OAB:OABBusinessUnitnew"));
cell = null;
cell = cells.get_Item(currentRow, 6);
cell.set_Value(custTable.InventLocation );
cell = null;
cell = cells.get_Item(currentRow, 7);
cell.set_Value(enum2Str(custTrans.TransType));
}
else if (ledgerJournalTrans.Voucher == bankAccountTrans.Voucher)
{
cell = null;
cell = cells.get_Item(currentRow, 3);
cell.set_Value('');
cell = null;
cell = cells.get_Item(currentRow, 4);
cell.set_Value('');
cell = null;
cell = cells.get_Item(currentRow, 5);
cell.set_Value(Global::OAIGetDimensionDisplayValue(ledgerJournalTrans.DefaultDimension,"@OAB:OABBusinessUnitnew"));
cell = null;
cell = cells.get_Item(currentRow, 6);
cell.set_Value('');
cell = null;
cell = cells.get_Item(currentRow, 7);
cell.set_Value(enum2Str(ledgerJournalTrans.TransactionType));
}
when i remove ledgerjournaltrans while select statement code shows data from 3 to 7 column , dont know what is happening can you please help out totally stuck on it