<Grid>
<Cfg id='Calc4' MainCol='Node' Version='4' Sorting='0'/>
<Cols>
      <C Name='Node' Type='Text' Width='130'/>
      <C Name='Active' Type='Bool' Width='40'/>
      <C Name='Cost' Type='Float' Width='35'/>
      <C Name='Total' Type='Float' Width='35'/>
      <C Name='Quantity' Type='Int' Width='50'/>
      <C Name='Tmp' Type='Float' Width='30'/>
      <C Name='PerParent' Type='Int' Format='0%' Width='40'/>
      <C Name='PerTotal' Type='Int' Format='0%' Width='35'/>
</Cols>
<Header Wrap='1' Cost='Local cost' Total='Total cost' Quantity='Total quantity' Tmp='Tmp cost (hidden)' PerParent='% of parent cost' PerTotal='% of total cost'/>
<Def>
<D Name='R' Calculated='1' Recalc='256'
   TotalFormula='Cost+sum("Tmp")' 
   TmpFormula='Active*Total*Quantity' 
   CalcOrder='*,Total,Tmp' 
   CalcOrder1='PerParent,PerTotal,*1'
   PerParentFormula='Tmp/Parent.Total'
   PerTotalFormula='PerParent*Parent.PerTotal'
   />
<D Name='FirstLevel'
 PerParentFormula='Tmp/Root.Total' PerTotalFormula='PerParent'
 />
</Def>
<Body>
<B>
<I Def='FirstLevel' Node='Level 1' Active='1' Cost='125' Quantity='4'>
	<I Node='Level 1-1' Active='1' Cost='25' Quantity='3'/>
	<I Node='Level 1-2' Active='1' Cost='4' Quantity='4'>
	   <I Node='Level 1-2-1' Active='0' Cost='20' Quantity='8'/>
	   <I Node='Level 1-2-2' Active='1' Cost='5' Quantity='2'/>
	</I>
	<I Node='Level 1-3' Active='0' Cost='122' Quantity='12'/>
</I>
<I Def='FirstLevel'  Node='Level 2' Active='1' Cost='21' Quantity='3'>
	<I Node='Level 2-1' Active='1' Cost='28' Quantity='4'/>
</I>
</B>
</Body>
<Foot>
<I id='Root' CalcOrder='*,Total,Tmp,*1' 
   Node='Root' CanEdit='0' ActiveType='Text' CostType='Text' QuantityType='Text' TmpFormula=' ' TmpType='Text' 
   TotalFormula='sum("Tmp")' PerParentType='Text' PerTotal='1'/>
</Foot>
</Grid>