Minimum Method (Collections) (Reporter)

Determines the minimum between either a constant value or a category, and one or more categories.

Syntax

collection.Minimum[(Operand)]

Applies To

Columns

Layers

Rows

Discussion

This method can also determine the minimum of multiple categories.

This method is only available if the Report object is in Reporter Mode (the ExplorerMode property is False).

Depending on whether the method was applied to an object or a collection, the results are returned respectively as an object or a collection. The new calculation is inserted directly after the active row or column.

References to the position of an object in the collection are not valid after you use this method.

Parameters

Description

Operand

Optional. Specifies either a constant value or a category object. If you do not specify this parameter, this method creates a category to display the minimum of all the categories in the collection. If you specify this parameter, the method determines a minimum from each category and creates a new category for each result.

Type: Variant

Return Type

Object

Example

This example determines the maximum of the first three rows and of column one and four.

Sub Main()
   Dim objPPRep As Object
   Dim objNewCol As Object
   Dim objNewRow As Object
   Set objPPRep = GetObject( , "CognosPowerPlay.Report")
   objPPRep.ExplorerMode = False
   Set objNewRow = objPPRep.Rows.SubSet(1,3).Minimum
   MsgBox "The minimum of the first three rows is " _
      &objPPRep.CellValue(objNewRow(1).Index,1)
   Set objNewCol = objPPRep.Columns.Item(4).Minimum _
      (objPPRep.Columns.Item(1))
   MsgBox "The minimum of columns 1 and 4 is " _
      &objPPRep.CellValue(1,objNewCol.Index)
   Set objNewRow = Nothing
   Set objNewCol = Nothing
   Set objPPRep = Nothing
End Sub

Related Topics