Dimension Object
Discussion
Use this object to change the default settings for dimensions in the DimensionLine object and to determine the properties of the dimension. Each Dimension object includes different levels of categories. You use the object to reference an item in a row, column or layer.
Special categories and alternate drill paths are also recognized by OLE automation. For example, a dimension "Years" may have the two regular categories "1995" and "1996", and three other categories named "Current Month", "QTD", and "Last Month" that represent special categories and alternate drill paths.
Performing a count on the "Years" Dimension
Msgbox Report.DimensionLine.Item("Years").Count
will return "5" because the regular categories and special categories are all visible to OLE automation.
It is possible to filter on a special category by naming it as
Report.DimensionLine.Item("Years").Change("Current Month")
Name |
Description |
---|---|
Changes the current category for the Dimension object. |
|
Changes the current category for the Dimension object to the category one level higher. |
|
Changes the current category for the Dimension object to top-level category. |
|
Returns the next child category in the hierarchy for the current dimension. |
|
Returns whether the current category has a parent. |
|
Returns all levels available in the dimension for a category. |
|
Returns the name of the parent category. |
Name |
Description |
---|---|
Returns the Application object. |
|
Set or returns whether a numeric value divided by zero appears as zero or blanks. |
|
Sets or returns whether missing numeric values appear as zero or blanks. |
|
Sets or returns whether zero numeric values are shown as zeros or blanks. |
|
Returns the number of categories one level below the current category. |
|
Returns the position of the Dimension object in the DimensionLine object. |
|
Returns whether the drill-down path is primary or alternate. |
|
Returns whether the category is a calculated category. |
|
Returns the level of the category in a dimension. |
|
Sets or returns the value and symbol for a specified currency. |
|
Sets or returns the name of the Dimension object. |
|
Sets or returns whether the Dimension Line object is visible to the user. |
Example
This example changes two of the current categories (one from the Year dimension, the other from the Product dimension) for the DimensionLine object in the current report.
Sub Main()
Dim objPPRep as Object
Dim objPPDim1 as Object
Dim objPPDim2 as Object
Set objPPRep = GetObject("c:\cognos\change.ppr")
Set objPPDim1 = objPPRep.DimensionLine.Item("Years")
Set objPPDim2 = objPPRep.DimensionLine.Item("Products")
objPPDim1.Change ("1996")
objPPDim2.Change ("Outdoor Products")
Set objPPDim2 = Nothing
Set objPPDim1 = Nothing
Set objPPRep = Nothing
End Sub