Database Reference
In-Depth Information
unfortunately, unlike IEssCube.getMember , it does not work with alias names.
IEssCubeOutline.findMember requires a member name and will throw an exception if
you pass an alias. If you substitute the alias name “Cola” for the member name in this
example, the IEssCubeOutline.findMember throws the following exception.
Cannot find member. Object not found.
In addition, as the IEssCubeOutline.findMember method performs a lookup by mem-
ber name, it also cannot return shared members.
When working with Essbase, it is often the case that you need information about
multiple related members. So far in our examples, we have been looking at methods
that return information about a single member. We will next turn our attention to
methods that can return multiple members based on their relationship to a given
member.
8.7.4 Getting IEssMember Objects Using IEssMemberSelection.executeQuery
member selection is such an important part of working with Essbase that there is an
interface specifically designed to query member information, the IEssMemberSelection
interface. This interface has six overloads of the executeQuery method that provide
robust options for selecting sets of members. The different overloads allow flexibility in
how you can select the members, and they fall into three general categories. First, you
can simply specify a member name, as in the earlier methods. Second, you can specify
member selection rules using query type and query option arguments. Finally, you can
specify member selection rules using the same member specification syntax used for
Calc Scripts. The first option is very similar in usefulness to the other techniques dis-
cussed previously. Each of the last two options provides the ability to select members
quite differently, but the task sequence you follow is the same, regardless of the execute-
Query overload that you use. The task sequence includes the following tasks.
•  open a member selection object
•  Execute the query
•  get the members into an iterator
•  Loop the iterator to process the members
•  Close the member selection object
The first of the executeQuery overloads uses a number of method arguments to deter-
mine the set of members to return. The selection may be based on the member relation-
ship to a base member, may be based on level or generation number, may be a search that
finds members based on an exact match, or may be a wildcard search. other arguments
provide the ability to search based on the member name only, on the alias name only, or
on a combination of both member names and aliases and may be limited to a specified
dimension. This technique also provides the ability for cursoring , or returning only a
part of the query results at a time. Let us take a look at a simple example.
The first task to complete when using the IEssMemberSelection interface is to obtain
an instance of IEssMemberSelection . This is quite easy using the IEssCube.openMember-
Selection method.
// open a member selection
IEssMemberSelection selection = cube.openMemberSelection("default");
Search WWH ::




Custom Search