Run server /Run Client /Run Call From
public void calculateRowsCalcList(
Map _rowsCalcExpressionList,
Map _ledgerBalColList,
container _rowList,
container _rowListIdx
)
{
MapIterator ledgerBalColListIterator;
LedgerBalColumnsDim ledgerBalColumnsDim;
boolean init;
RecordSortedList calcLevels;
int lengthRowList = conlen(_rowList);
int i;
LedgerRowDefLine tmpLedgerRowDefLine;
;
calcLevels = new RecordSortedList(tablenum(LedgerRowDefLine));
calcLevels.sortOrder(fieldnum(LedgerRowDefLine, Level));
for (i = 1; i <= lengthRowList; i++)
{
tmpLedgerRowDefLine = conpeek(_rowList,i);
if (tmpLedgerRowDefLine.Type == DimensionsLedgerDimensionType::Calculation)
{
// Make the sort order reverse
tmpLedgerRowDefLine.Level = tmpLedgerRowDefLine.Level * -1;
calcLevels.ins(tmpLedgerRowDefLine);
}
}
init = true;
calcLevels.first(tmpLedgerRowDefLine);
while (tmpLedgerRowDefLine)
{
tmpLedgerRowDefLine.Level = tmpLedgerRowDefLine.Level * -1;
//when run client or run call from(not server) ,
//may be catch error: ledgerBalColListIterator not initilize error
//in report, it run in server,in form ,default in client/call from,
//so should set properties:runon = server in form menuitem
ledgerBalColListIterator = new MapIterator(_ledgerBalColList);
while (ledgerBalColListIterator.more())
{
ledgerBalColumnsDim = ledgerBalColListIterator.value();
if (ledgerBalColumnsDim.checkColumnWithNewRanges())
{
this.calculateRowsCalcListColumn(_rowsCalcExpressionList,
ledgerBalColListIterator.key(),
_rowList,
_rowListIdx,
tmpLedgerRowDefLine.Level,
ledgerBalColumnsDim.ToDate);
}
ledgerBalColListIterator.next();
}
this.adjustDebitCreditGroupTotalAmount(_ledgerBalColList, _rowList, init, -tmpLedgerRowDefLine.Level);
init = false;
if (! calcLevels.next(tmpLedgerRowDefLine))
{
break;
}
}
}
Map
posted on 2010-06-12 16:07 lingdanglfw 阅读(444) 评论(0) 编辑 收藏 举报