示例#1
0
 protected MdxWithClauseItem(MdxObjectReferenceExpression name, MdxExpression exp, IEnumerable <MdxCalcProperty> props)
     : this(name, exp)
 {
     if (props != null)
     {
         CalcProperties.AddRange(props);
     }
 }
示例#2
0
 public MdxSelectStatement(
     IEnumerable <MdxWithClauseItem> with,
     IEnumerable <MdxAxis> axes,
     MdxWhereClause where,
     MdxObjectReferenceExpression cube)
 {
     if (with != null)
     {
         With.AddRange(with);
     }
     if (axes != null)
     {
         Axes.AddRange(axes);
     }
     _Cube   = cube;
     m_Where = where;
 }
		public MdxSelectStatement(
				IEnumerable<MdxWithClauseItem> with,
				IEnumerable<MdxAxis> axes,
				MdxWhereClause where,
				MdxObjectReferenceExpression cube)
		{
			if (with != null)
			{
				With.AddRange(with);
			}
			if (axes != null)
			{
				Axes.AddRange(axes);
			}
			_Cube = cube;
			m_Where = where;
		}
        public String BuildDrillThrough(CellInfo cell)
        {
            String result = String.Empty;
            if (cell != null)
            {
                //var tuple = new Dictionary<String, MemberInfo>();
                //if (cell.ColumnMember != null && cell.ColumnMember != MemberInfo.Empty)
                //{
                //    cell.ColumnMember.CollectAncestors(tuple);
                //}
                //if (cell.RowMember != null && cell.RowMember != MemberInfo.Empty)
                //{
                //    cell.RowMember.CollectAncestors(tuple);
                //}
                
                //var statement = GetMoveAxesStatement(RefreshQuery());
                var statement = this.CreateWrappedStatement();
                var tuple = cell.GetTuple();
                if (statement != null && tuple != null && tuple.Count > 0)
                {
                    statement.Axes.Clear();
                    List<MdxExpression> members = new List<MdxExpression>();
                    foreach(var member in tuple.Values)
                    {
                        var expr = new MdxObjectReferenceExpression(member.UniqueName, member.Caption);
                        members.Add(expr);
                    }

                    statement.Axes.Add(new MdxAxis("0", new MdxTupleExpression(members)));

                    using (MdxDomProvider provider = MdxDomProvider.CreateProvider())
                    {
                        StringBuilder sb = new StringBuilder();
                        provider.GenerateMdxFromDom(statement, sb, new MdxGeneratorOptions());
                        result = sb.ToString();
                    }

                    if (!String.IsNullOrEmpty(result))
                        result = String.Format("DRILLTHROUGH {0}", result);
                }
            }
            return result;
        }
		protected MdxWithClauseItem(MdxObjectReferenceExpression name, MdxExpression exp, IEnumerable<MdxCalcProperty> props)
			: this(name, exp)
		{
			if (props != null)
				CalcProperties.AddRange(props);
		}
		protected MdxWithClauseItem(MdxObjectReferenceExpression Name, MdxExpression Expression)
		{
			this.Name = Name;
			this.Expression = Expression;
			this.CalcProperties.ListChanged+=_ClearChildTokens;
		}
		public MdxWithSetItem(MdxObjectReferenceExpression name, MdxExpression exp, IEnumerable<MdxCalcProperty> props)
			: base(name, exp, props)
		{
		}
示例#8
0
 public MdxWithSetItem(MdxObjectReferenceExpression name, MdxExpression exp, IEnumerable <MdxCalcProperty> props)
     : base(name, exp, props)
 {
 }
示例#9
0
 protected MdxWithClauseItem(MdxObjectReferenceExpression Name, MdxExpression Expression)
 {
     this.Name       = Name;
     this.Expression = Expression;
     this.CalcProperties.ListChanged += _ClearChildTokens;
 }