public void Draw(MdxDrawContext dc) { dc.Append("Sum ("); dc.EndOfLine(); dc.IncLevel(); dc.BeginLine(); _mdxElement.Draw(dc); dc.Append(string.Format(".Lag({0}) :", _offset - 1)); dc.EndOfLine(); dc.BeginLine(); _mdxElement.Draw(dc); dc.Append(".Lag(0),"); dc.EndOfLine(); dc.BeginLine(); _measure.Draw(dc); dc.EndOfLine(); dc.CloseBracket(")"); dc.Append("/"); dc.Append(_offset.ToString()); }
public void Draw(MdxDrawContext dc) { if (IsEmpty()) { return; } if (_rows.Count > 1) { var unionMdxBuilder = new TypedMdxElement(_rows.ToArray()); _rows = new List <IMdxElement>(); _rows.Add(unionMdxBuilder); } int i = 0; foreach (var column in _rows) { dc.BeginLine(); column.Draw(dc); dc.Append(i < _rows.Count - 1 ? "," : ""); dc.EndOfLine(); i++; } dc.AppendLine("ON ROWS"); }
public void Draw(MdxDrawContext dc) { dc.Append("NONEMPTY "); dc.OpenBracket("("); int i = 0; foreach (var mdxBuilder in _mdxBuilders) { mdxBuilder.Draw(dc); dc.Append(i < _mdxBuilders.Count - 1 ? "," : ""); i++; } if (_mdxMeasures != null) { dc.Append(", "); dc.OpenBracket(); i = 0; foreach (var mdxMeasure in _mdxMeasures) { mdxMeasure.Draw(dc); dc.Append(i < _mdxMeasures.Count - 1 ? "," : ""); dc.EndOfLine(); i++; } dc.CloseBracket(); } dc.CloseBracket(")"); }
public void Draw(MdxDrawContext dc) { dc.Append("SET ["); dc.Append(_name); dc.Append("] AS"); dc.EndOfLine(); dc.IncLevel(); dc.BeginLine(); _asMember.Draw(dc); dc.DecLevel(); }
public void Draw(MdxDrawContext dc) { dc.AppendLine("WITH"); dc.IncLevel(); int i = 0; foreach (var measure in _members) { dc.BeginLine(); measure.Draw(dc); dc.EndOfLine(); i++; } dc.DecLevel(); }
public void Draw(MdxDrawContext dc) { dc.OpenBracket(); int i = 0; foreach (var measure in _measures) { dc.BeginLine(); measure.Draw(dc); dc.Append(i < _measures.Count - 1 ? "," : ""); dc.EndOfLine(); i++; } dc.CloseBracket(); }
public void Draw(MdxDrawContext dc) { dc.IncLevel(); int i = 0; foreach (var column in _columns) { column.Draw(dc); dc.Append(i < _columns.Count - 1 ? "," : ""); dc.EndOfLine(); i++; } dc.DecLevel(); dc.Append("ON COLUMNS"); }
public void Draw(MdxDrawContext dc) { dc.OpenBracket("NON EMPTY("); int i = 0; foreach (var column in _rows) { column.Draw(dc); dc.Append(i < _rows.Count - 1 ? "," : ""); dc.EndOfLine(); i++; } dc.Append(","); dc.EndOfLine(); dc.AppendLine("ORDER"); dc.OpenBracket("("); dc.BeginLine(); dc.Append("(" + _measureOrDimension + ".children),"); dc.EndOfLine(); dc.BeginLine(); dc.Append(_measureOrDimension); dc.Append(".CurrentMember.Properties(\"Key\"),"); dc.EndOfLine(); dc.BeginLine(); dc.Append(_dir); dc.EndOfLine(); dc.CloseBracket(")"); dc.EndOfLine(); dc.CloseBracket(")"); //, [Measures].[Amount] //[Ent Contacts].[Ent MainManagers - Name].CurrentMember.Properties("Key") //, asc) }