by AlexZencovich » Mon Feb 26, 2007 9:22 pm
It will impossibel with default formula language because if user filter out region2 (or region1 etc) result will...strange. Moreover, result may have value only for region dimension but not for client dimension(for example).
So, if user place another dimension on columns formula should work in another way.
You may use TPivotMap.OnGetCalcMeasure event to override current formula language with your own (you mau use pure Delphi code or any available complex script engine like VBScript, Java, Dream script, PaxScript etc) to make complex formula which will check used dimension, access to cell value etc etc.
You just need to see how get cell value by absolute coordinates (TPivotMap.Cells adn TPivotMap.RowCells and TPivotMap.ColumnCells)
It is not easy task so you may check if you really need that in OLAP engine or simple static crosstab report will enough.
Best regards,
Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment