Example #1
0
        internal MdxAxis GenerateCurrentAxis(AxisInfo AxesInfo)
        {
            var newExpression = this.Expression;

            foreach (var Hierarchy in AxesInfo.Hierarchies)
            {
                if (Hierarchy.ExpandedCells.Count > 0)
                {
                    var SetExpanded = new MdxSetExpression();
                    foreach (var Tuple in Hierarchy.ExpandedCells.Keys)
                    {
                        SetExpanded.Expressions.Add(new MdxTupleExpression(Tuple));
                    }
                    newExpression = new MdxFunctionExpression
                                        ("ORDER"
                                        , new MdxFunctionExpression("DRILLDOWNMEMBER", newExpression, SetExpanded, RECURSIVE)
                                        , ONE
                                        );
                }
                if (Hierarchy.CollapsedCells.Count > 0)
                {
                    var SetCollapsed = new MdxSetExpression();
                    foreach (var Tuple in Hierarchy.CollapsedCells.Keys)
                    {
                        SetCollapsed.Expressions.Add(new MdxTupleExpression(Tuple));
                    }
                    newExpression = new MdxFunctionExpression("DRILLUPMEMBER", newExpression, SetCollapsed);
                }
            }
            if (newExpression == this.Expression)
            {
                return(this);
            }

            return(new MdxAxis(this.Name, newExpression, this.Having, this.DimensionProperties));
        }
		internal MdxAxis GenerateCurrentAxis(AxisInfo AxesInfo)
		{
			var newExpression=this.Expression;
			foreach (var Hierarchy in AxesInfo.Hierarchies)
			{
				if (Hierarchy.ExpandedCells.Count > 0)
				{
					var SetExpanded = new MdxSetExpression();
					foreach (var Tuple in Hierarchy.ExpandedCells.Keys)
					{
						SetExpanded.Expressions.Add(new MdxTupleExpression(Tuple));
					}
					newExpression =new MdxFunctionExpression
					( "ORDER"
					,new MdxFunctionExpression("DRILLDOWNMEMBER", newExpression,	SetExpanded, RECURSIVE)
					, ONE
					);
				}
				if (Hierarchy.CollapsedCells.Count > 0)
				{
					var SetCollapsed=new MdxSetExpression();
					foreach(var Tuple in Hierarchy.CollapsedCells.Keys)
					{
						SetCollapsed.Expressions.Add(new MdxTupleExpression(Tuple));
					}
					newExpression = new MdxFunctionExpression("DRILLUPMEMBER", newExpression,	SetCollapsed);
				}
			}
			if (newExpression==this.Expression)
				return this;
				
			return new MdxAxis(this.Name,newExpression,this.Having,this.DimensionProperties);
		}
Example #3
0
 internal Hierarchy(AxisInfo AxisInfo, string HierarchyUniqueName, int Index)
 {
     this.AxisInfo            = AxisInfo;
     this.Index               = Index;
     this.HierarchyUniqueName = HierarchyUniqueName;
 }
		internal Hierarchy(AxisInfo AxisInfo, string HierarchyUniqueName, int Index)
		{
			this.AxisInfo = AxisInfo;
			this.Index=Index;
			this.HierarchyUniqueName = HierarchyUniqueName;
		}