HideSelected Method

Hides selected objects in a collection.

Syntax

Report.HideSelected

Applies To

Report Object

Discussion

Use this method in conjunction with the Select method. Once objects are selected in a collection using Select, you can hide them using HideSelected. To reveal all hidden objects, use the Unhide method. It returns True if it is successful; otherwise, it returns False if an error occurs.

Return Type

Boolean

Example

This example searches for and hides all rows that begin with "Star."

Sub Main()
   Dim objPPRep As Object
   Dim intFound As Integer
   Const begins_with = 2
   Const current_layer = False
   Const rows = 1
   Set objPPRep = GetObject(, "CognosPowerPlay.Report")
   objPPRep.Rows.Item(1).Activate
   intFound = 1
   Do While intFound <> 0
      intFound = objPPRep.FindNext("Star", begins_with,
_
         current_layer, rows)
      If intFound = -1 Then
         objPPRep.Rows.Active.Select
         objPPRep.HideSelected
      End If
   Loop
   Set objPPRep = Nothing
End Sub

Related Topics