Table of contents

Application.VisualReportsSaveCube 方法 (项目)Application.VisualReportsSaveCube Method (Project)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

将“可视报表”多维数据集保存到默认目录或指定的目录中。Saves a Visual Reports cube to the default directory or to a specified directory.


表达式VisualReportsSaveCube(* * strNamePath,* * PjVisualReportsCubeType,* * ReportAlLFields,* * PjVisualReportsDataLevel ** )expression. **VisualReportsSaveCube( ** strNamePath, ** PjVisualReportsCubeType, ** ReportAlLFields, ** PjVisualReportsDataLevel )

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.


名称Name必需/可选Required/Optional数据类型Data Type说明Description
strNamePathstrNamePath可选OptionalStringString名称和要保存多维数据集文件 (.cub) 的位置的完整路径。Name and full path of the location to which to save the cube file (.cub).
PjVisualReportsCubeTypePjVisualReportsCubeType可选OptionalLongLong保存多维数据集类型。可以是一个PjVisualReportsCubeType consants。默认值为pjTaskTPSave cube type. Can be one of the PjVisualReportsCubeType consants. Default is pjTaskTP.
ReportAlLFieldsReportAlLFields可选OptionalBooleanBoolean如此,所有非自定义字段是否包含在报表中。默认值为FalseIf True, all noncustom fields are included in the report. Default is False.
PjVisualReportsDataLevelPjVisualReportsDataLevel可选OptionalLongLong保存数据级别。可以是PjVisualReportsDataLevel常量之一。默认值为pjLevelAutomaticSave data level. Can be one of the PjVisualReportsDataLevel constants. Default is pjLevelAutomatic.

返回值Return Value



PjVisualReportsDataLevel 参数指定时间分段的数据可访问的级别。例如,如果pjLevelMonths指定 (月数),则它不能访问pjLevelDays (天)。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).

将 ReportAllFields 参数设置为True ,则会降低性能。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") 
 MsgBox ("Cube not saved successfully") 
 End If 
End Sub
© 2018 Microsoft