Добрый день.
Да действительно имеется такой ограничение. Но оно срабататывает когда хотя бы одна мера в кубе типа "AmountCur" или руками поставлена галка "Использование таблицы суммы" в "Экземлярах куба" (когда мера типа AmountCur - эта галочка проставляется автоматически и убрать ее нельзя - используется для пересчета суммы в валюте).
Здесь 2 решения:
1. Увеличить кол-во элементов (Array Elements) в EDT OLAPAmountArray до нужного количества...
2. Прежде чем увеличивать кол-во элементов, я бы на вашем месте проверил сколько на самом деле мер типа "AmountCur", и если оно меньше 10 - то можно сделать как мы, небольшую доработку:
- в методе init класса OLAPCubeMetaData вместо
PHP код:
...
while select OLAPMeas order by measName where OLAPMeas.cubeName == OLAPCube.cubeName
{
if (OLAPMeas.isValid())
{
n++;
measures[n] = conIns( measures[n],1,OLAPMeas.measName);
measures[n] = conIns( measures[n],2,OLAPMeas.measAgregate);
measures[n] = conIns( measures[n],3,this.viewName(OLAPMeas.table));
measures[n] = conIns( measures[n],4,OLAPMeas.field);
measures[n] = conIns( measures[n],5,'');
measures[n] = conIns( measures[n],6,OLAPCube.transDate);
measures[n] = conIns( measures[n],7,this.currency());
measures[n] = conIns( measures[n],8,OLAPMeas.amountCur);
measures[n] = conIns( measures[n],9,OLAPMeas.amountMST);
[COLOR="DarkRed"]amountNumber++;[/COLOR]
if (OLAPMeas.amountCur || OLAPMeas.amountMST)
{
...
поставить
PHP код:
...
while select OLAPMeas order by measName where OLAPMeas.cubeName == OLAPCube.cubeName
{
if (OLAPMeas.isValid())
{
n++;
measures[n] = conIns( measures[n],1,OLAPMeas.measName);
measures[n] = conIns( measures[n],2,OLAPMeas.measAgregate);
measures[n] = conIns( measures[n],3,this.viewName(OLAPMeas.table));
measures[n] = conIns( measures[n],4,OLAPMeas.field);
measures[n] = conIns( measures[n],5,'');
measures[n] = conIns( measures[n],6,OLAPCube.transDate);
measures[n] = conIns( measures[n],7,this.currency());
measures[n] = conIns( measures[n],8,OLAPMeas.amountCur);
measures[n] = conIns( measures[n],9,OLAPMeas.amountMST);
if (OLAPMeas.amountCur || OLAPMeas.amountMST)
{
[COLOR="DarkRed"]amountNumber++;[/COLOR]
...
- в методе createAmounts класса OLAPCreateAmount
вместо
PHP код:
...
// find the currency
rowCurrencyCode = factTableRecord.(idxCurField);
// find the date
transDAte = factTableRecord.(cubeTable.TransDateFieldId);
// loop over all measures
i = 0;
while select measTmp
where measTmp.cubename == cubeTable.CubeName
{
[COLOR="Red"]i++;[/COLOR]
// get amount
amount = factTableRecord.(measTmp.measFieldId);
// if amount field
if ((measTmp.AmountCur == noyes::Yes) || (measTmp.AmountMST == noyes::Yes))
{
if (measTmp.AmountMST == Noyes::Yes)
{
measCurrencyCode = companyCurrencyCode;
// translate if needed
if (this.isSpecialMSTAmount(measTmp.measTableId,measTmp.measFieldId))
{
amount = this.specialMSTAmount(factTableRecord, measTmp.measFieldId,dictTable);
}
}
if (measTmp.AmountCur == noyes::Yes)
{
measCurrencyCode = rowCurrencyCode ;
}
if (measCurrencyCode != cubeInstance.currency)
{
if (cubeInstance.currency == companyCurrencyCode)
{
amount = Currency::mstAmount(amount,measCurrencyCode,transDate);
}
else
{
amount = Currency::curAmount2CurAmount(amount,measCurrencyCode,cubeinstance.currency,transDate);
}
}
}
olapAmount.OLAPAmount[i] = amount;
// end loop measures
...
поставить
PHP код:
...
// find the currency
rowCurrencyCode = factTableRecord.(idxCurField);
// find the date
transDAte = factTableRecord.(cubeTable.TransDateFieldId);
// loop over all measures
i = 0;
while select measTmp
where measTmp.cubename == cubeTable.CubeName
{
// get amount
amount = factTableRecord.(measTmp.measFieldId);
// if amount field
if ((measTmp.AmountCur == noyes::Yes) || (measTmp.AmountMST == noyes::Yes))
{
if (measTmp.AmountMST == Noyes::Yes)
{
measCurrencyCode = companyCurrencyCode;
// translate if needed
if (this.isSpecialMSTAmount(measTmp.measTableId,measTmp.measFieldId))
{
amount = this.specialMSTAmount(factTableRecord, measTmp.measFieldId,dictTable);
}
}
if (measTmp.AmountCur == noyes::Yes)
{
measCurrencyCode = rowCurrencyCode ;
}
if (measCurrencyCode != cubeInstance.currency)
{
if (cubeInstance.currency == companyCurrencyCode)
{
amount = Currency::mstAmount(amount,measCurrencyCode,transDate);
}
else
{
amount = Currency::curAmount2CurAmount(amount,measCurrencyCode,cubeinstance.currency,transDate);
}
}
}
[COLOR="red"]if( cubeInstance.UseAmountTable )
if( (measTmp.AmountCur == noyes::Yes) ||
(measTmp.AmountMST == noyes::Yes) )
{
i++ ;
olapAmount.OLAPAmount[i] = amount;
} [/COLOR]
// end loop measures
...