Re: Slow while adding rows in Table using TableAddLine August 25, 2022 03:57PM |
Registered: 4 years ago Posts: 87 |
Re: Slow while adding rows in Table using TableAddLine August 25, 2022 04:36PM |
Admin Registered: 5 years ago Posts: 297 |
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 08:21AM |
Registered: 4 years ago Posts: 87 |
bQueryResult = HExecuteSQLQuery(sdQuery, a360_DataBaseConnection, hQueryWithoutCorrection, ls_select) IF bQueryResult THEN HReadFirst(sdQuery) IF HOut(sdQuery) = False THEN FOR EACH sdQuery nRow = TableAddLine(Table_Ledger) Table_Ledger[nRow].COL_VoucherDate = sdQuery.voucherdate /* similary set value for another 20 columns */ END END END TableSort(Table_Ledger, "table_ledger.COl_accountname", "table_ledger.COL_VoucherDate", "Table_Ledger.COL_DayBookOrder", "Table_Ledger.COL_VoucherSeries", "table_ledger.COL_VoucherVersion", "table_ledger.COL_VoucherNumber", "table_ledger.COL_SequenceNumber" )
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 09:28AM |
Registered: 5 years ago Posts: 236 |
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 09:35AM |
Admin Registered: 5 years ago Posts: 297 |
Christoph Erdmann
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 09:42AM |
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 10:24AM |
Registered: 4 years ago Posts: 87 |
FOR EACH sdQuery nRow = TableAddLine(Table_Ledger) IF Combo_AltLanguage = "Y" THEN Table_Ledger[nRow].COL_AccountName = sdQuery.accountnametamil Table_Ledger[nRow].COL_AccountNarration = sdQuery.accountnarrationtamil ELSE Table_Ledger[nRow].COL_AccountName = sdQuery.accountname Table_Ledger[nRow].COL_AccountNarration = sdQuery.accountnarration END Table_Ledger[nRow].COL_VoucherDate = sdQuery.voucherdate Table_Ledger[nRow].COL_DebitCredit = sdQuery.debitcredit = "D" ? "Dr." ELSE "Cr." Table_Ledger[nRow].COL_VoucherNumber = sdQuery.vouchernumber Table_Ledger[nRow].COL_VouNo = sdQuery.vouno Table_Ledger[nRow].COL_CompanyCode = sdQuery.companycode Table_Ledger[nRow].COL_BranchCode = sdQuery.branchcode Table_Ledger[nRow].COL_AccountPeriodID = sdQuery.accountperiodid Table_Ledger[nRow].COL_VoucherSeries = sdQuery.voucherseries Table_Ledger[nRow].COL_VoucherVersion = sdQuery.voucherversion Table_Ledger[nRow].COL_SequenceNumber = sdQuery.sequencenumber Table_Ledger[nRow].COL_AccountNameFK = sdQuery.accountnamefk Table_Ledger[nRow].COL_TransactionDetailPK = sdQuery.transactiondetailpk Table_Ledger[nRow].COL_TransactionHeaderPK = sdQuery.headerpk Table_Ledger[nRow].COL_DayBookOrder = sdQuery.daybookorder Table_Ledger[nRow].COL_AccountGroupFK = sdQuery.accountgroupfk Table_Ledger[nRow].COL_TotalWeight = sdQuery.weight IF go_variables.getDebitCredit() = "D" THEN Table_Ledger[nRow].COL_DebitAmount = sdQuery.debitamount Table_Ledger[nRow].COL_CreditAmount = sdQuery.creditamount ELSE Table_Ledger[nRow].COL_DebitAmount = sdQuery.creditamount Table_Ledger[nRow].COL_CreditAmount = sdQuery.debitamount END END
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 10:30AM |
Registered: 4 years ago Posts: 87 |
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 10:36AM |
Registered: 5 years ago Posts: 236 |
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 11:06AM |
Admin Registered: 5 years ago Posts: 297 |
nTableRow is int nTableCount is int = hnbrec(sdQuery) sAccountName is string aAccNarration is string sDebitCredit is string cCreditAmt is currency cDebitAmt is currency For nTablerow = 1 to nTableCount IF Combo_AltLanguage = "Y" THEN sAccountName = sdQuery.accountnametamil aAccNarration = sdQuery.accountnarrationtamil ELSE sAccountName = sdQuery.accountname aAccNarration = sdQuery.accountnarration End //IF Combo_AltLanguage = "Y" THEN If sdQuery.debitcredit = "D" sDebitCredit = "Dr." cDebitAmt = sdQuery.debitamount cCreditAmt = sdQuery.creditamount else sDebitCredit = "Cr." cDebitAmt = sdQuery.creditamount cCreditAmt = sdQuery.debitamount END //If sdQuery.debitcredit = "D" TableAddline(Table_Ledger,sAccountName,aAccNarration,sdQuery.voucherdate,sDebitCredit,sdQuery.vouchernumber,... sdQuery.vouno,sdQuery.companycode,branchcode,sdQuery.accountperiodid,sdQuery.voucherseries,sdQuery.voucherversion,... sdQuery.sequencenumber,accountnamefk,sdQuery.transactiondetailpk,sdQuery.headerpk,sdQuery.daybookorder,sdQuery.accountgroupfk,... sdQuery.weight,cCreditAmt,cDebitAmt) Hreadnext(sdQuery) END //For nTablerow = 1 to nTableCount
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 11:13AM |
Admin Registered: 5 years ago Posts: 297 |
Re: Slow while adding rows in Table using TableAddLine August 26, 2022 12:55PM |
Registered: 5 years ago Posts: 236 |
Re: Slow while adding rows in Table using TableAddLine September 06, 2022 02:47PM |
Registered: 4 years ago Posts: 87 |