2.9 brings to you a number of features. The support for OLAP is one of them. As most of you know, the Advanced Datagrid from the Flex SDK has a subclass, the OLAPDataGrid that takes a special kind of a data provider. There is an entire namespace dedicated to OLAP manipulation. Although this is not a very widely used feature, nevertheless, some of our customers did ask for it. So, with no further ado, presenting, the all new OLAPFlexDataGrid. The Olap DataGrid offers the following features that the stock OLAPDataGrid does not:

  • Sortable columns
  • Built in Expand Collapse of Column groups
  • Built in Expand Collapse of Rows
  • Row Spans for Cells that group values
  • Built in support for footers
  • Built in support to calculate running totals for summary values
  • Ability to hook into columns created to specify custom label functions

We’ve also created a set of examples using the OLAPFlexDataGrid. Below are some screenshots, and you can experience the application here.

For Trials:When you request a trial, please ensure to request the Dashboard Trial as well, since the OLAP trial uses the “FieldSet” component that is only a part of the Dashboard swc. You will need to place both the Ultimate trial swc as well as the Dashboard trial swc in your libs folder. If you are an Ultimate only customer, you will need to download the dashboard + ultimate Trial to run the OLAP demos. If you wish to use the OLAPDataGrid and not purchase dashboard, you can simply replace the fieldset component with a Panel or something similar.

From the documentation:

The OlapFlexDataGrid control expands on the functionality of the Flexicious Ultimate control to add support for the display of the results of OLAP queries. Like all Flex data grid controls, the OLAPDataGrid control is designed to display data in a two-dimensional representation of rows and columns.

Because of the way you pass data to the OLAPDataGrid control, it has several differences from the Flexicious Ultimate control:

  • You cannot edit cells in the OLAPDataGrid control because cell data is a result of a query and does not correspond to a single data value in the OLAP cube.
  • The data provider will only accept IOLAPResult values
  • A number of features meant for transactional data, like lazy load, inline filters, paging, etc. does not apply to OLAP data.

You populate an OlapFlexDataGrid control with data by setting its data provider to an instance of the OLAPResult class, which contains the results of an OLAP query.

Unlike the OLAPDataGrid that ships with the SDK, the Ultimate OlapFlexDataGrid converts the incoming IOLAPResult to a hierarchical collection. It does not use renderer providers. Since it provides support for expand collapse and the row and column levels, it takes the IOLAPResult and iterates through its row positions to convert them into an array collection of objects that have a 'children' property. This is repeated for the number of dimensions in the row, for a multi level hierarchy. This collection is then provided to the base dataprovider with the enableDynamicLevels flag turned on, so that the grid will instantiate the appropriate number of nested levels. You can configure each level as it is created by wiring up the dynamicLevelCreated event or the dynamicAllLevelsCreated event. The Ultimate OlapFlexDataGrid will also dispatch the following events:

  • olapColumnCreated: Dispatched when a column is created after introspecting the IOLAPResult Use this event to perform post processing of the columns after the grid has applied all its defaults
  • olapColumnGroupCreated: Dispatched when a grouped column is created after introspecting the IOLAPResult Use this event to perform post processing of the column group after the grid has applied all its defaults. Please note, this is dispatched after the initial column group is created, not after all the columns are added to the group. If you need that, you should use the columnsCreated event, which is dispatched after all columns and column groups are created. Please note, since the FlexDataGridEvent does not have a columnGroup property, the item property of the FlexDataGridEvent is used to store the column group that is created. Please do not modify the columns collection until AFTER olapDataProviderConverted is dispatched, because the column ordinal indexes are used in conversion of columns to hierarchical data.
  • olapColumnsCreated:Dispatched when all the columns are created after introspecting the IOLAPResult Use this event to perform post processing of the columns after the grid has applied all its defaults. Please do not modify the columns collection until AFTER olapDataProviderConverted is dispatched, because the column ordinal indexes are used in conversion of columns to hierarchical data.
  • olapDataProviderConverted: Dispatched when the IOLAPREsult is converted to a nested array collection and is set as the dataprovider. The OlapFlexDataGrid takes the IOLAPResult as a dataprovider and iterates through its row positions to convert them into an array collection of objects that have a 'children' property. This is repeated for the number of dimensions in the row, for a multi level hierarchy. This collection is then provided to the base dataprovider. You may modify the columns collection in this event.