I've fully gone through and tested the script in the documentation. After going through it several times. It's not working as expected.
It's creating the hierarchy well enough, but a lot of the elements and parents show up more than once. For example:
G1
--Total
----North
------TK1
--------G1
--------G2
[snip]
It appears that the combination of the 'DIMENSIONELEMENTINSERT' and 'DIMENSIONELEMENTCOMPONENTADD' adds the element more than once. I tried it on a basic example and the results ended up with duplication as well
In the following basic example:
Code: Select all
DIMENSIONDESTROY('MyDim');
DIMENSIONCREATE('MyDim');
DIMENSIONELEMENTINSERT('MyDim','','MyChild','n');
DIMENSIONELEMENTINSERT('MyDim','','MyParent','c');
DIMENSIONELEMENTCOMPONENTADD('MyDim','MyParent','MyChild',1.000000);
I got the a result where the 'MyChild' element repeated twice:
MyChild
--MyParent
----MyChild
Is there some setting I need to change or...?
Here's the code I used from the user guide:
Prolog
Code: Select all
#****Begin: Generated Statements***
#****End: Generated Statements****
DIMENSIONDESTROY('Unbalanced');
DIMENSIONCREATE('Unbalanced');
Metadata
Code: Select all
#****Begin: Generated Statements***
#****End: Generated Statements****
IF (G1@<>'');
DIMENSIONELEMENTINSERT('Unbalanced','',G1,'n');
DIMENSIONELEMENTINSERT('Unbalanced','',TOTAL,'c');
DIMENSIONELEMENTINSERT('Unbalanced','',NORTH,'c');
DIMENSIONELEMENTINSERT('Unbalanced','',TK1,'c');
DIMENSIONELEMENTCOMPONENTADD('Unbalanced',TOTAL,NORTH,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Unbalanced',NORTH,TK1,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Unbalanced',TK1,G1,1.000000);
ELSEIF (TK1@<>'');
DIMENSIONELEMENTINSERT('Unbalanced','',TOTAL,'c');
DIMENSIONELEMENTINSERT('Unbalanced','',NORTH,'c');
DIMENSIONELEMENTINSERT('Unbalanced','',TK1,'n');
DIMENSIONELEMENTCOMPONENTADD('Unbalanced',TOTAL,NORTH,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Unbalanced',NORTH,TK1,1.000000);
ELSE;
DIMENSIONELEMENTINSERT('Unbalanced','',TOTAL,'c');
DIMENSIONELEMENTINSERT('Unbalanced','',NORTH,'n');
DIMENSIONELEMENTCOMPONENTADD('Unbalanced',TOTAL,NORTH,1.000000);
ENDIF;