//get Dimension Hrchy by dimension Hrchy
static void GetDimensionHRCHy(Args _args)
{
DimensionHierarchy dimHierarchy;
DimensionHierarchyLevel dimHierarchyLevel;
DimensionAttribute dimAttribute;
DimensionConstraintTree conTree;
DimensionConstraintNode conNode;
DimensionConstraintNodeCriteria conNodeCriteria;
;
{
DimensionHierarchy dimHierarchy;
DimensionHierarchyLevel dimHierarchyLevel;
DimensionAttribute dimAttribute;
DimensionConstraintTree conTree;
DimensionConstraintNode conNode;
DimensionConstraintNodeCriteria conNodeCriteria;
;
dimHierarchy = DimensionHierarchy::find(5637148326);
conTree = DimensionConstraintTree::findByDimensionHierarchy(dimHierarchy.RecId);
conTree = DimensionConstraintTree::findByDimensionHierarchy(dimHierarchy.RecId);
setPrefix('"' + dimHierarchy.Name + '"');
while select dimHierarchyLevel
order by Level
where dimHierarchyLevel.DimensionHierarchy == dimHierarchy.RecId
{
order by Level
where dimHierarchyLevel.DimensionHierarchy == dimHierarchy.RecId
{
dimAttribute = DimensionAttribute::find(dimHierarchyLevel.DimensionAttribute);
info(strFmt("Attribute at level %1 is %2",dimHierarchyLevel.Level,dimAttribute.Name));
info(strFmt("Attribute at level %1 is %2",dimHierarchyLevel.Level,dimAttribute.Name));
while select conNode
order by Ordinal
where conNode.DimensionConstraintTree == conTree.RecId
&& conNode.DimensionHierarchyLevel == dimHierarchyLevel.RecId
{
order by Ordinal
where conNode.DimensionConstraintTree == conTree.RecId
&& conNode.DimensionHierarchyLevel == dimHierarchyLevel.RecId
{
while select conNodeCriteria
where conNodeCriteria.DimensionConstraintNode == conNode.RecId
{
if(conNodeCriteria.RangeFrom || conNodeCriteria.RangeTo)
{
info(strFmt(" - Limited from %1 to %2",
conNodeCriteria.RangeFrom,
conNodeCriteria.RangeTo));
}
else
info(" - [No restriction]");
}
}
}
}
where conNodeCriteria.DimensionConstraintNode == conNode.RecId
{
if(conNodeCriteria.RangeFrom || conNodeCriteria.RangeTo)
{
info(strFmt(" - Limited from %1 to %2",
conNodeCriteria.RangeFrom,
conNodeCriteria.RangeTo));
}
else
info(" - [No restriction]");
}
}
}
}
No comments:
Post a Comment