Multiplication Method (Objects)

Multiplies a constant value or a category by an object.

Syntax

object .Multiplication(Operand)

Applies To

Column Object

Layer Object

Row Object

Discussion

For Column, Layer, and Row objects, the method determines a result for each category and operand pair, and creates a new category for each result.

Depending on whether the method was applied to an object or a collection, the results are returned respectively as an object or a collection.

In Explorer mode, the new calculation is inserted directly after the last operand. In Reporter mode, 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.

In Explorer mode, if you change a report by removing a level, drilling, filtering or nesting, then all calculations that can not be created in the changed report disappear.

Parameters

Description

Operand

Required. Specifies either a constant value or a category object.

Type: Variant

Return Type

Object

Example

This example multiplies the values in a column by 6 and returns the product in a new column.

Sub Main()
   Dim objPPRep as Object
   Dim objPPCol as Object
   Set objPPRep = CreateObject ("CognosPowerPlay.Report")
   objPPRep.Open "DC:\Cubes and Reports\Sample1.ppx"
   Set objPPCol = objPPRep.Columns.Item("Tents")
   objPPCol.Multiplication(6)
   objPPRep.Save
   Set objPPCol = Nothing
   Set objPPRep = Nothing
End Sub

Related Topics