Add Method (Exceptions)
Adds an Exception object to the Exceptions collection.
Syntax
Exceptions.Add Identifier
Applies To
Discussion
The Add method adds an Exception object to an Exceptions collection. The Identifier is the name to be given to the added object.
When you create an exception using the Add method, it is not a shared exception, and will not be added to the ppexcept.ini file.
References to the position of an object in the collection are not valid after you use this method.
Parameters |
Description |
---|---|
Identifier |
Required. Specifies the exception name. Type: String |
Return Type
Object
Example
This example creates an exception with one range and then applies it to a new report. The style that is applied to the exception must be predefined.
Sub Main()
Dim objPPRep As Object
Dim strExceptionName As String
strExceptionName = "At Least 400 Thousand"
Set objPPRep = CreateObject("CognosPowerPlay.Report")
objPPRep.New "C:\Cubes and Reports\Great Outdoors.mdc",True
objPPRep.ExplorerMode = False
objPPRep.Visible = True
objPPRep.Exceptions.Add strExceptionName
objPPRep.Exceptions.Item(strExceptionName).Ranges.Add
_
"Minimum",399999,"Good News"
objPPRep.Columns.Exception =strExceptionName
Set objPPRep = Nothing
End Sub