Search
English
Locating a hierarchy member

All operations, fulfilled in the RadarCube library, deal with hierarchy members represented by the TMember objects. Thus, locating a hierarchy member is one of the important tasks for a programmer to solve. The speed of this operation and the searching algorithm will depend on the programmer’s choice.

When working with RadarCube, you should remember that any object of TMember related to a certain hierarchy member can be destroyed and re-created even within a single session.

To re-create TMember objects (as well as TLevel), use the following operations:

  • restore the Grid state from a file or a stream;
  • use Undo or Redo operations;
  • use the hierarchy editor.

      If a programmer fulfills any of the these operations, or there is a possibility for a user to fulfill one of them, then it is better for a programmer not to count on reference to the TMember instance, which he has obtained earlier, to be still valid.

      That is why the task of locating a hierarchy member is of vital importance.

      Locating a member by its unique name, stored in the UniqueName property, does not hamper the component's performance. For MS AS, a unique hierarchy member name is the same as its unique MDX name, and for the Desktop version (with the TOLAPCube object as the data source), its unique name is formed as follows:

      [TDimension.DisplayName].[THieararchy.DisplayName].[TMember.DisplayName]...[TMember.DisplayName]. A chain of [TMember.DisplayName]...[TMember.DisplayName] is formed according to the positioning of the members within a hierarchy.

      For example, if you have a dimension Time, a hierarchy Fiscal Date containing levels Year, Month and Day, and you need to form a unique name for a member, which corresponds to the date May 7, 2006, then it will look as follows:

      [Time].[Fiscal Date].[2006].[May].[7]

      If you know the unique member's name, then use the following methods to find an appropriate object to TMember:

      • TLevel.FindMember
      • THierarchy.FindMemberByName
      • TEvaluator.Member
      • TOLAPGrid.FindMemberByName, but keep in mind that it is advisable to call methods from the beginning of this list.

      If you have only a display name of the object, then you can call the last three functions from this list, passing the following chain of arguments as a parameter: [TDimension.DisplayName].[THieararchy.DisplayName].[TMember.DisplayName]...[TMember.DisplayName]. A chain of [TMember.DisplayName]...[TMember.DisplayName] is formed according to the hierarchy structure of the members within the hierarchy (see the example two paragraphs above).

      In some cases, you can give the string [TDimension.DisplayName].[THieararchy.DisplayName].[TMember.DisplayName] in any of the functions as an argument, despite the relations of the members within the hierarchy. However, we won't recommend this method, since, first, it's too slow, and, second, it can return wrong results if there are several members with the same display name in the same hierarchy.

      There is a workaround, however, that is more preferable in regard to speed: using the TCubeMember.RetrieveGridMember method.

      The TCubeMember objects, unlike the TMember objects, are not re-created during the Cube's session. That is why, if once per session you save reference to a TCubeMember object, then you will always be able to use it.

  • Related links

    Download Radar-Soft products


    Buy Radar-Soft products


    Visit our support site


    Hot news
    Click to subscribe

     July 22, 2010

    RadarCube for WPF beta is here

    The new RadarCube for WPF version has started.

    Details...

     

    Latest versions
    Click to subscribe

     July 14, 2010

    RadarCube ASP.NET 2.44.3

    Changes...Download...

     

     June 25, 2010

    RadarCube WinForms Desktop 2.31.0

    Changes...Download...

     

     June 25, 2010

    RadarCube WinForms MSAS 2.31.0

    Changes...Download...

     

     May 20, 2010

    RadarCube VCL 1.18.0

    Changes...Download...

     

     April 22, 2010

    HierCube VCL 4.56.0

    Changes...Download...

     

     July 15, 2009

    Essential Pack Pro for ASP.NET 1.11.0

    Changes...Download...

     

     July 15, 2009

    Essential Pack for ASP.NET 1.11.0

    Changes...Download...

     

     November 5, 2008

    WinForms Chart 1.00.1

    Changes...Download...

     

    Related articles
    Click to subscribe

     May 5, 2010

    New Silverlight add-on for RadarCube ASP.NET

    Details...

     

     March 30, 2010

    Designing the Cube with the Cube Creation Wizard

    Details...

     

     December 16, 2009

    Creating custom Time Intelligence

    Details...

     

     November 26, 2009

    Creating the correct Cube structure

    Details...

     

     September 30, 2009

    RadarCube Request tracker

    Details...

     

     August 24, 2009

    Customizing the toolbox in Ria OLAP controls

    Details...
    More articles...
    Support | Download | Purchase | Partners | Upgrade and Discount Policy | Contacts © 2005-2010 Radar-Soft, L.L.C. All rights reserved.