Grouping DataSource
Grouping DataSource
Web Central provides a specialized DataSource that can retrieve grouped and aggregated data sets for advanced data display controls (charts, 1D and 2D MDX reports) - the grouping DataSource. The add-in managers can define grouping DataSources using AXVW format, and Java programmers can create grouping DataSources in Java code, or load them from view files.
A grouping DataSource can contain:
- One or more tables. A grouping DataSource defines tables in the same way as ordinary DataSource. If more than one table is defined, the DataSource will generate a JOIN.
- Zero or more grouping fields. Grouping fields become parts of the GROUP BY clause of the generated SQL query, and are similar to MDX dimensions.
- Zero or more calculated fields. Calculated fields become parts of the SELECT clause of the generated SQL query, and are similar to MDX measures.
- Non-grouping and non-calculated fields cannot be used in a grouping DataSource, because SQL queries that include GROUP BY clause require that all columns in the SELECT clause must be either aggregated (these are calculated fields), or also appear in the GROUP BY clause (these are grouping fields).
- Zero or more sort fields. Sort fields in a grouping DataSource can reference only grouping fields or calculated fields by name, and not any other database columns.
- Zero or more restrictions. A grouping DataSource can include same types of restrictions as ordinary DataSource, and the restrictions can be based on any field from any table defined in the DataSource - they are not limited to grouping and calculated fields.