Table of contents
TOC
折叠目录
展开目录

GroupCriteria.Add 方法 (项目)GroupCriteria.Add Method (Project)

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

GroupCriteria集合中添加一个GroupCriterion对象。Adds a GroupCriterion object to a GroupCriteria collection.

语法Syntax

表达式添加(* * FieldName,* *升序排序,* 字体名称 * FontSize,* * FontBold,* 倾斜字体下划线 * FontColor,* * CellColor,* 模式 * GroupOn,* * StartAt,* 间距)expression. **Add( ** FieldName, ** Ascending, ** FontName, ** FontSize, ** FontBold, ** FontItalic, ** FontUnderLine, ** FontColor, ** CellColor, ** Pattern, ** GroupOn, ** StartAt, ** GroupInterval* )

表达式_一个表示GroupCriteria对象的变量。_expression A variable that represents a GroupCriteria object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
FieldNameFieldName必需RequiredStringString作为分组依据的域名称。The name of the field being grouped by.
升序Ascending可选OptionalBooleanBoolean如此如果按升序分组定义中的字段进行分组。如果按降序分组字段。默认值为TrueTrue if the field in a group definition should be grouped in ascending order. False if the field should be grouped in descending order. The default value is True.
字体名称FontName可选OptionalStringString用于分组定义的字体的名称。The name of the font for a group definition.
字号FontSize可选OptionalIntegerInteger分组定义中的字号,以磅为单位。默认值为 8。The size of the font in a group definition, in points. The default value is 8.
FontBoldFontBold可选OptionalBooleanBoolean如此如果分组定义中的字体为加粗。默认值为TrueTrue if the font in a group definition is bold. The default value is True.
倾斜字体FontItalic可选OptionalBooleanBoolean如此如果分组定义中的字体为斜体。默认值为FalseTrue if the font in a group definition is italic. The default value is False.
下划线FontUnderLine可选OptionalBooleanBoolean如此如果分组定义中的字体带下划线。默认值为FalseTrue if the font in a group definition is underlined. The default value is False.
FontColorFontColor可选OptionalLongLong分组定义中的字体颜色。可以是PjColor常量之一。默认值是pjBlackThe color of the font in a group definition. Can be one of the PjColor constants. The default value is pjBlack.
CellColorCellColor可选OptionalLongLong分组定义中单元格的背景颜色。可以是PjColor常量之一。默认值是pjColorAutomaticThe color of the cell background in a group definition. Can be one of the PjColor constants. The default value is pjColorAutomatic.
模式Pattern可选OptionalLongLong分组定义中单元格的图案。可以是PjBackgroundPattern常量之一。The pattern for the cells in a group definition. Can be one of the PjBackgroundPattern constants.
分组依据GroupOn可选OptionalLongLong分组定义中的分组类型。可以是PjGroupOn常量之一。默认值是pjGroupOnEachValueThe type of grouping in a group definition. Can be one of the PjGroupOn constants. The default value is pjGroupOnEachValue.
StartAtStartAt可选OptionalVariantVariant分组定义中间隔的起始值。日期域的默认值为字符串“Project Start Date”,其余所有域的默认值均为 0。The start of the intervals in a group definition. The default value is 0 for all fields except date fields, where it is the string "Project Start Date".
间距GroupInterval可选OptionalVariantVariant分组定义中的间隔。默认值为 1。The interval in a group definition. The default value is 1.

返回值Return Value

GroupCriterionGroupCriterion

另请参阅See also

概念Concepts

GroupCriteria 集合对象GroupCriteria Collection Object

© 2018 Microsoft