Dimension Property
Syntax
object.Dimension
Applies To
Discussion
Use this property to set the name of a dimension line for a subset for the AdvancedQuery and FindQuery queries only. When searching for a specific dimension, get the top level dimension line settings first. An invalid dimension line value in the subset definition returns an exception error.
For an AdvancedQuery or FindQuery, use the Execute method to run the subset definition for the query once all related properties are set.
The Dimension property must appear first, in the AdvancedQuery and FindQuery subset definitions.
For a ValueRestriction, the order of the components is important. The Dimension property must be set before the Measure, Operator, Operand1, Operand2, and Count properties and the DimensionFilter method. The Name property can be set anywhere within the filter definition.
Default: Entire Cube (FindQuery)
Type
String
Access
Read/Write
Example
This example creates a FindQuery (type 1) subset definition that searches for all products that begin with the name Star.
Sub Main()
Dim strCubePath As String
Dim objPPRep As Object
Dim objFind As Object
strCubePath = "C:\Cubes and Reports\Great Outdoors.mdc"
Set objPPRep = CreateObject("CognosPowerPlay.Report")
objPPRep.New strCubePath, 1
objPPRep.ExplorerMode = False
objPPRep.Visible = True
Set objFind = objPPRep.ReportQueries.Add(1)
With objFind
.Name = "Find Star"
.Dimension = "Products"
.SearchShortName = False
.SearchText = "Star"
.Pattern = 2
End With
Set objFind = Nothing
Set objPPRep = Nothing
End Sub