Represent Mdx query statement.
Inheritance: MdxExpressionBase
        public void SimpleWay()
        {
            var axisSlicerMember = new MdxMember();
            axisSlicerMember.Titled("Dim Hierarchy", "Dim");

            var axisSlicer = new MdxTuple();
            axisSlicer.With(axisSlicerMember);

            var axis = new MdxAxis();
            axis.Titled(MdxAxisType.Columns);
            axis.AsNonEmpty();
            axis.WithSlicer(axisSlicer);

            var cube = new MdxCube();
            cube.Titled("Cube");

            var querySlicerMember = new MdxMember();
            querySlicerMember.Titled("Dim Hierarchy", "Dim", "Dim Key");
            querySlicerMember.WithValue("1");

            var querySlicer = new MdxTuple();
            querySlicer.With(querySlicerMember);

            var query = new MdxQuery();
            query.On(axis);
            query.From(cube);
            query.Where(querySlicer);
        }
Beispiel #2
0
        /// <summary>
        /// Sets the <see cref="MdxQuery"/> as parent query source and returns the updated current instance of <see cref="MdxQuery"/>.
        /// It will clear any cubes if specified.
        /// </summary>
        /// <param name="innerQuery">Specified <see cref="MdxQuery"/> as query source.</param>
        /// <returns>Returns the updated current instance of <see cref="MdxQuery"/>.</returns>
        public MdxQuery From(MdxQuery innerQuery)
        {
            _cubes.Clear();

            InnerQuery = innerQuery;
            return(this);
        }
Beispiel #3
0
        /// <summary>
        /// Sets the <see cref="MdxQuery"/> as parent query source and returns the updated current instance of <see cref="MdxQuery"/>.
        /// It will clear any cubes if specified.
        /// </summary>
        /// <param name="innerQuery">Specified <see cref="MdxQuery"/> as query source.</param>
        /// <returns>Returns the updated current instance of <see cref="MdxQuery"/>.</returns>
        public MdxQuery From(MdxQuery innerQuery)
        {
            _cubes.Clear();

            InnerQuery = innerQuery;
            return this;
        }