예제 #1
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");
        }
예제 #2
0
        public void Draw(MdxDrawContext dc)
        {
            if (Where == null || !Where.Measures.Any())
            {
                return;
            }

            dc.AppendLine("WHERE");

            Where.Draw(dc);
        }
예제 #3
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();
        }
예제 #4
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)
        }