private bool DoCalculate(OlapControl Grid, ICubeAddress Address, out object Value, out CellFormattingProperties Formatted) { var fEvent = new CalcMemberArgs(); fEvent.fEvaluator = new Evaluator(Grid, Address); if (Address.IsCalculatedByExpression) { Value = DoCalculateExpression(Grid, Address, fEvent.fEvaluator); fEvent.ReturnValue = Address.Measure.FormatValue(Value, Address.Measure.DefaultFormat); Formatted = new CellFormattingProperties(fEvent.ReturnValue, fEvent.ReturnBackColor, fEvent.ReturnForeColor, fEvent.fFontStyle, fEvent.fFontName, fEvent.fFontSize); return(Value != null); } fEvent.fValue = null; Grid.EventCalcMember(fEvent); Formatted = new CellFormattingProperties(fEvent.ReturnValue, fEvent.ReturnBackColor, fEvent.ReturnForeColor, fEvent.fFontStyle, fEvent.fFontName, fEvent.fFontSize); Value = fEvent.ReturnData; return(Value != null); }