maxColsPerPage

Returns or sets the maximum number of columns on a page. If you are setting this property, the value passed must be cast as a Long.

Tip:

For information on pages, see Pages on Grids.

Read-write.

Example

The following example defines the grid for an HFMwDataGrid object. The column dimensions are Account and Period, and the row dimension is Entity. The members of the row and column dimensions are specified with the dimensions’ [Hierarchy] member lists, while the members of the page dimensions are set to the dimensions’ default members.

Dim cHFMDataGrid, cHFMMetadata, cHFMDimension
Dim vaColDims(1), vaRowDims(0), vaListIDs, vaListNames
Set cHFMDataGrid = Server.CreateObject("Hyperion.HFMwDataGrid")
'g_cHFMSession is a previously set HFMwSession object
cHFMDataGrid.SetWebSession g_cHFMSession
' Set the maximum columns/rows per page
cHFMDataGrid.maxColsPerPage = CLng(50)
cHFMDataGrid.maxRowsPerPage = CLng(50)
'Set the column and row dimensions
vaColDims(0) = DIMENSIONACCOUNT
vaColDims(1) = DIMENSIONPERIOD
cHFMDataGrid.columnDimensions = vaColDims
vaRowDims(0) = DIMENSIONENTITY
cHFMDataGrid.rowDimensions = vaRowDims
Set cHFMMetadata = g_cHFMSession.metadata
cHFMDataGrid.parentID = MEMBERNOTUSED
'Loop thru the dimensions
For i = DIMENSION_LBOUND To DIMENSION_UBOUND
  Set cHFMDimension = cHFMMetadata.dimension(i)
  ' If a row or column dimension, use [Hierarchy]
  If i = DIMENSIONENTITY Or i = DIMENSIONACCOUNT or _ 
      i = DIMENSIONPERIOD Then
    'Get the ID for the [Hierarchy] member list
    cHFMDimension.EnumMemberLists WEBOM_METADATA_INFO_ALL, _ 
      vaListIDs, vaListNames
    For j = 0 to uBound(vaListNames)
      If vaListNames(j) = "[Hierarchy]" Then
        lListID = vaListIDs(j)
        Exit For
      End If
    Next
    cHFMDataGrid.memberListID(i) = lListID
    cHFMDataGrid.useList(i) = TRUE
    ' Otherwise it's a page dimension
  Else
    cHFMDataGrid.memberID(i) = cHFMDimension.defaultMemberID
  End If
Next