Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 3
0
        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)
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
        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();
        }