Application.VisualReportsSaveCube method (Project)
Saves a Visual Reports cube to the default directory or to 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
The PjVisualReportsDataLevel parameter specifies the level to which the timephased data can be accessed. For example, if pjLevelMonths (months) is specified, it not possible to access pjLevelDays (days).
Setting the ReportAllFields parameter to True can degrade performance.
Example
The following code saves a cube.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.