Represents the OLAPTable Catalog. This object provides access to a multi-dimensional databases (MDD) such as the dimensions, level, member, measures, and properties.
The following example shows how to use a try-catch block to retrieve the dimensions from two OLAPCatalogs. If OLAPCatalog dimensions cannot be retrieved (no connection is made, the query does not exist etc.), an exception occurs and “No OLAPQueryx Dimensions retrieved” displayed in the Console window. If dimensions are retrieved, “OLAPQueryx Dimensions are retrieved” is displayed in the Console window.
try { QRetrieve =ActiveDocument.Sections["OLAPQuery1"] QRetrieve.Catalog.Dimensions.RetrieveDimensions() Console.Writeln("OLAPQuery1 Dimensions retrieved") } catch(e) { Console.Writeln("No OLAPQuery1 Dimensions retrieved") } try { QRetrieve =ActiveDocument.Sections["OLAPQuery"] QRetrieve.Catalog.Dimensions.RetrieveDimensions() Console.Writeln("OLAPQuery Dimensions retrieved") } catch(e) { Console.Writeln("No OLAPQuery Dimensions retrieved")
This example shows how to count the number of dimensions in the OLAPCatalog and display the value in an Alert box.
Application.Alert("The number of dimensions is:" + ActiveDocument.Sections["OLAPQuery"].Catalog.Dimensions.Count)
This example shows how to programmatically add topics to a Data Model section: