Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report: How to loop through all children elements with macro

Status
Not open for further replies.

andrerausch

Technical User
Jul 1, 2004
3
DE
Hello,
I want to save my report as an ascii file for all children
elements in one dimension, right now I do it with this
macro:

strDim ="Locations" 'Dimension
strGroup = "Europe" 'Group with the elements I want to loop

Set objPPDim = objPPRep.DimensionLine.Item(strDim)
objPPDim.Change(strGroup)
Set objRepLevel = objPPDim
If objPPDim.Name <> strDim then
For x = 1 to objRepLevel.Count
Set objRepCat = objRepLevel.Children.Item(x)
objPPDim.Change(objRepCat.Name)
...
Next x
End if

Is there an easier way, coz I don't want to go from the parents down to the children, takes a lot of time and
isn't really necessary.
I'm new to this so be gentle :)
Thanks in advance,
cya,
André
 
Apparently there is no way to loop through all children of
the current level, now I do it with a 2nd report, do the
drill up/down stuff to get the children names and apply
them to the main report(PPRep.Change(...)).
Not very elegant, but it works :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top