MicroStrategy ONE

Examples for Displaying Report Grids

These examples demonstrate retrieving all the objects required to generate the report grid that contains row, columns, and page headers. First, the grid titles (page, columns, and rows) are retrieved, followed by the column and page headers, and finally the rows, from which the row headers and metric values can be obtained.

Refer to the points to consider for grid display section before starting with any customization.

The following examples are provided:  

Points to consider for grid display

  • Reports that contain a dimension in the template normally have one subtitle that corresponds to the displayed attribute This subtitle contains a number of subtitles that correspond to its attribute forms. In such a scenario, the getGridSubTitles method in the WebSubTitle interface is different than NULL. 

  • Before generating the page headers, consider the object representation. For example, the PageTreeStyle option in the result flags has a collection of header elements within each header element. On the other hand, the Flat style option returns a NULL. Use the isCurrentElement method to determine the selected element. 

  • For  reports that contain a consolidation or custom group, use the isSameAsParent method to decide whether the attribute should be displayed. 

  • For sorting on a specific attribute in a column, use the getContainer method to obtain all the column headers involved in the sort

    2001

    2002

    USA

    France

    USA

    France

    Referring to the table above, if you want to sort on the first USA element in the column header, remember to get the 2001 column header as well so you know all the attributes involved in the sort.  For the row headers, this method returns the element that is before the current one. 

  • All the collections (WebHeaders, WebTitle, and WebRowValue) are saved in an order from left to right.  This is helpful when displaying the grid.  For the WebGridHeaders collection, the WebHeaders objects are ordered from the top to the bottom for row-by-row navigation. 

  • Use the getElementType method of the WebElement object to determine the type of element that is associated with a header element.  This returns a number associated with the EnumDSSXMLElementType enumeration.