Exemplo n.º 1
0
        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(")");
        }
Exemplo n.º 2
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());
        }
Exemplo 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)
        }
Exemplo n.º 4
0
        public void Draw(MdxDrawContext dc)
        {
            dc.Append("SubSet");
            dc.OpenBracket("(");

            _mdxElement.Draw(dc);
            dc.Append(", ");
            dc.Append(_start.ToString());

            dc.Append(", ");
            dc.Append(_count.ToString());

            dc.CloseBracket(")");
        }
Exemplo n.º 5
0
        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++;
            }

            dc.CloseBracket(")");
        }
Exemplo 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();
        }