UnselectBlank Method

Unselects a specific blank row or column.

Syntax

object.UnselectBlank BlankNumber

Applies To

Column Object

Row Object

Discussion

Use UnselectBlank in conjunction with the Item and ItemAtLevel methods in crosstab reports. When a crosstab has blank rows or columns that have been selected by the SelectBlank method, UnselectBlank turns off the selection of the blank item.

Parameter

Description

BlankNumber

Required. Specifies the value indicating a blank item. BlankNumber acts as an index, where the first blank row or column is 1, the second is 2, and so on.

Type: Long

Return Type

Nothing

Example

This example uses the AddBlanks method to add a blank row before the last row and a blank column before the last column in the active report.

Sub Main()
   Dim objPPRep As Object
   Dim intRow As Integer
   Dim intColumn As Integer
   Set objPPRep = GetObject(,"CognosPowerPlay.Report")
   objPPRep.ExplorerMode = False
   intRow = objPPRep.Rows.Count - 1
   intColumn = objPPRep.Columns.Count - 1
   objPPRep.Rows.Item(intRow).Select
   objPPRep.AddBlanks
   objPPRep.Rows.Unselect
   objPPRep.Columns.Item(intColumn).Select
   objPPRep.AddBlanks
   objPPRep.Columns.Unselect
   objPPRep.Rows.ItemAtLevel(intRow,0).SelectBlank(1)
   objPPRep.Columns.ItemAtLevel(intColumn,0).SelectBlank(1)
   Msgbox " A blank row and column have been added "
& _
      "and selected.",64,"Blanks"
   objPPRep.Rows.ItemAtLevel(intRow,0).UnselectBlank(1)
   objPPRep.Columns.ItemAtLevel(intColumn, _
      0).UnselectBlank(1)
   Msgbox " The blank row and column have now been "
& _
      "unselected.",64,"Blanks" 
   Set objPPRep = Nothing
End Sub