Sgdva
Sgdva

Reputation: 2800

HypQueryMembers fails to retrieve with error 57704

Background
I need to find the query members that you get by using member selection. In the reporting cube it works, but in the planning one I get an error 57704.
Problem
The VBA code that I have works for the reporting cube, but it does not for the planning one, so I'm not quite sure if there is something specific for the planning cube that I'm missing. I can see the data that I need when I click Member Selection in both.
Code
Using the standard

Sub getListUsingUsers()
    sts = HypQueryMembers(Empty, "Profit", HYP_CHILDREN, Empty, Empty, Empty, Empty,vArray) 'I get 57704
    for each i in vArray 
    debug.print i
    next i   
    
End Sub

I get results using

Sub Example_HypGetMemberInformation()
sts = HypGetMemberInformation(Empty, "Profit", HYP_MI_CHILD_COUNT, vtValues, vtPropertyValueString)
For Each i In vtPropertyValueString
Debug.print i ' I get 10 which is correct
Next i
End Sub


Question
How can I properly use this function so I don't get the error 57704? I have tried all arguments for 1-11, where only 11 works but it returns its name
• 1 = HYP_CHILDREN
• 2 = HYP_DESCENDANTS
• 3 = HYP_BOTTOMLEVEL
• 4 = HYP_SIBLINGS
• 5 = HYP_SAMELEVEL
• 6 = HYP_SAMEGENERATION
• 7 = HYP_PARENT
• 8 = HYP_DIMENSION
• 9 = HYP_NAMEDGENERATION
• 10 HYP_NAMEDLEVEL
• 11 HYP_SEARCH

Upvotes: 0

Views: 40

Answers (0)

Related Questions