SetDrivingCategory Method
Syntax
Exception.SetDrivingCategory (DrivingCategory, DrivingDimension)
Applies To
Discussion
The DrivingDimension and DrivingCategory pair identifies a unique category to base the exception definition. The selected category is the driving category for each range of values. IBM® Cognos® PowerPlay® compares only the data in the driving category with the range of values specified, and uses the driving category to determine the parts of the report to highlight. When no driving category is specified, PowerPlay searches all categories for which the exception is defined to find values that match the specified range.
The SetDrivingCategory method is case-sensitive. The return values of the SetDrivingCategory method are
0 = Failure 1 = Success
To clear the parameter, DrivingCategory, use "<None>". For example, to clear the Exception object, Except1, of the driving category, use the following:
Except1.SetDrivingCategory ("<None>", 0)
Parameters |
Description |
---|---|
DrivingCategory |
Required. Specifies the identifier for the driving category. This parameter refers to the category label of the row or column desired. Type: Variant |
DrivingDimension |
Required. Specifies the category type for the driving category. Possible values are 0 = Rows 1 = Columns Type: Integer |
Return Type
Boolean
Example
This example opens a report, sets the driving category for an existing exception, and saves the changes.
Sub Main()
Dim objPPRep as Object
Dim objExcept1 as Object
Set objPPRep = GetObject("C:\Cubes and Reports\test.ppx")
Set objExcept1 = objPPRep.Exceptions.Item("Overdue")
objExcept1.SetDrivingCategory "Environmental Line",1
objPPRep.Columns.Exception = "Overdue"
objPPRep.Save
Set objExcept1 = Nothing
Set objPPRep = Nothing
End Sub