Share via


Application.VisualReportsSaveCube Method

Project Developer Reference

Saves a Visual Reports cube to the default directory or a specified directory.

Syntax

expression.VisualReportsSaveCube(strNamePath, PjVisualReportsCubeType, ReportAlLFields, PjVisualReportsDataLevel)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
strNamePath Optional String Name and full path of the location to which to save the cube file (.cub).
PjVisualReportsCubeType Optional Long Save cube type. Can be one of the PjVisualReportsCubeType consants. Default is pjTaskTP.
ReportAlLFields Optional Boolean If True, all noncustom fields are included in the report. Default is False.
PjVisualReportsDataLevel Optional Long Save data level. Can be one of the PjVisualReportsDataLevel constants. Default is pjLevelAutomatic .

Return Value
Boolean

Remarks

Setting the ReportAllFields parameter to True can degrade performance.

Example
The following code saves a cube.

Visual Basic for Applications
  Sub a()
    Dim tf As Boolean
    tf = Application.VisualReportsSaveCube("c:\cube.cub", pjTaskNTP, , pjLevelQuarters)
    If tf = True Then
    MsgBox ("Cube saved successfully")
    Else
    MsgBox ("Cube not saved successfully")
    End If
End Sub

See Also