title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.VisualReportsSaveCube method (Project) |
vbapj.chm2139 |
|
project-server |
|
51b65e15-7ab5-79ff-9513-c47b204c1751 |
06/08/2017 |
medium |
Saves a Visual Reports cube to the default directory or to a specified directory.
expression. VisualReportsSaveCube
( _strNamePath_
, _PjVisualReportsCubeType_
, _ReportAlLFields_
, _PjVisualReportsDataLevel_
)
expression A variable that represents an Application object.
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. |
Boolean
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.
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
[!includeSupport and feedback]