MicroStrategy ONE
Displaying the Page Headers
This example demonstrates how to display the page headers.
Code sample
1. WebGridHeaders pageHeaders = reportGrid.getPageHeaders();
2. for (int i=0; i < pageHeaders.size(); i++){
3. WebHeaders pgElements = pageHeaders.get(i);
4. for (int j=0; j < pgElements.size(); j++){
5. WebHeader pgElement = pgElements.get(j);
6. if (pgElement.isCurrentElement()){
// code to display the element.
7. }
8. }
9. }
Explanation
Line 1 gets the page headers from the WebReportGrid object. Lines 2-9 get the current element selected, and display it in the report. Note that this code sample changes for the PageTreeStyle flag.