Represents Mdx cube specification.
Inheritance: MdxExpressionBase
Example #1
0
        /// <summary>
        /// Appends the specified <see cref="MdxAxis"/> and returns the updated current instance of <see cref="MdxQuery"/>.
        /// It will inner query if specified.
        /// </summary>
        /// <param name="cube">Specified <see cref="MdxCube"/> as query source.</param>
        /// <returns>Returns the updated current instance of <see cref="MdxQuery"/>.</returns>
        public MdxQuery From(MdxCube cube)
        {
            InnerQuery = null;

            _cubes.Add(cube);
            return this;
        }
        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);
        }
Example #3
0
        /// <summary>
        /// Appends the specified <see cref="MdxAxis"/> and returns the updated current instance of <see cref="MdxQuery"/>.
        /// It will inner query if specified.
        /// </summary>
        /// <param name="cube">Specified <see cref="MdxCube"/> as query source.</param>
        /// <returns>Returns the updated current instance of <see cref="MdxQuery"/>.</returns>
        public MdxQuery From(MdxCube cube)
        {
            InnerQuery = null;

            _cubes.Add(cube);
            return(this);
        }