icCube

Documentation

icCube Web Reporting : Global Functions

getGlobalFiltersState

This function is retrieving the state of all the filter widgets that are marked as 'Global'. For each of them, it is retrieving both the cube and the schema, the MDX member that is selected for filtering or members if it is the MANUAL mode or the MDX expression if it is the MDX mode and a list of selected items.

This function is a part of the Reporting object so it can be called as following:

        var ic3Reporting = new ic3.Reporting(/* your reporting definition */);

        // then later in your code:

        var state = ic3reporting.getGlobalFiltersState();
    

The result will be an object containing your filter widgets. For example:

        {
          "reportCubeInfo": { // Current report schema info
            "cubeName"  : "MyCube",
            "schemaName": "Sales"
          },
          "widgets": {
            "w2": { // Your widget id
              "selection": [ // Array of selected members
                {
                  "name"      : "Egypt",
                  "uniqueName": "[Customers].[Geography].[Country].&[EGY]"
                },
                {
                  "name"      : "South Africa",
                  "uniqueName": "[Customers].[Geography].[Country].&[ZAF]"
                },
                {
                  "name"      : "India",
                  "uniqueName": "[Customers].[Geography].[Country].&[IND]"
                },
                {
                  "name"      : "Indonesia",
                  "uniqueName": "[Customers].[Geography].[Country].&[IDN]"
                },
                {
                  "name"      : "Iran",
                  "uniqueName": "[Customers].[Geography].[Country].&[IRN]"
                }
              ],
              "cubeInfo": { // Widget schema info
                "cubeName"  : "MyCube",
                "schemaName": "Sales"
              },
              "mdxMember": { // MDX member selected for filtering
                "name"       : null,
                "memberBase" : {
                  "hierarchy": "[Customers].[Geography]",
                  "level"    : "[Customers].[Geography].[Country]",
                  "members"  : []
                }
              }
            },
            "w5": {
              // another widget info...
            }
          }
        }