Annotation

Annotation 可返回有关网格对象内注释的已请求信息。您可以定义要返回的信息。

语法:

<<Annotation("GridName", Row, Col, Page, Attributes, Reference, Attachments)>>

<<Annotation("GridName", Row, Col, Page)>>

<<Annotation("GridName", Row, Col, Page, Attributes, Reference)>>

<<Annotation("GridName", Row, Col, Page, Attributes, Attachments)>>

<Annotation("GridName", AllRows, AllCols, Page, Attributes, Attachments)>>

其中:

  • GridName 是包含注释的网格的名称。当网格的文本单元格或自定义标题中使用了 Attribute 时,支持使用 "current" 关键字。

  • Row 是网格的行号。当网格的文本单元格或自定义标题中使用了 Attribute 时,支持使用 "current" 关键字。

    注:

    要选择所有行,可以用关键字AllRows 来替换 row

  • Col 是网格的列引用(字母)。当网格的文本单元格或自定义标题中使用了 Attribute 时,支持使用 "current" 关键字。

    注:

    要选择所有列,可使用关键字 AllCols 来替换 Col

  • Page 是一个数值,它表示网格的所有页维上的成员组合的索引。网格中第一个页维组合的索引为 1,第二个页维组合的索引为 2,依此类推。

  • Attributes 标识要从注释中返回的信息。可包括关键字 All(默认值)或结合使用以下一个或多个关键字:Title & Description & Author & Date & Category。属性关键字可以按任意输出顺序排列。每个属性之间必须使用 & 符号分隔。

  • Reference 是注明了要返回的注释的关键字,其中:

    • All(默认)将返回初始注释和全部回复。

    • Top <n> 将返回初始注释和前 <n> 个回复。

    • Bottom <n> 将返回初始注释和后 <n> 个回复。初始注释将始终显示,数字 <n> 不包括初始注释。

    • BottomOnly <n> 将返回后 <n> 个回复。如果回复数 <n> 为 4 或更小,则显示初始注释;如果回复数 <n> 为 5 或更大,则不显示初始注释。

    • First 仅返回初始注释。

    • Replies 将返回全部回复。初始注释将不会显示。

  • Attachments 是布尔值 (true/false),指示是否应随报表打印与注释关联的附件,其中:

    • True 表示将在报表末尾打印附件。

    • False 表示不打印附件。

示例:

<<Annotation("Grid1", cur, A, cur, All, All, true)>>

<<Annotation("Grid1", cur, A, cur, Title & Description & Author & Date & Category, Top 10, true)>>

<<Annotation("Grid10", 284, AB, cur, Title & Description & Date & Category, Bottom 10, false)>>

<<Annotation("Grid1", cur, A, cur, Title & Description & Author, BottomOnly 4, false)>>

<<Annotation("Grid Name", 1, A, 1, All)>>

<<Annotation("Grid Name","AllRows", "AllCols", 1, All)>>

<<Annotation("Grid Name", 1, A, 1, All, First)>>

<<Annotation("Grid Name", 1, cur, cur, All, Replies)>>

<<Annotation("Grid Name", 1, cur, cur)>>

<<Annotation("Grid Name",1, cur, cur, Desc, Replies)>>

<<Annotation(cur, cur, A, cur, Desc)>>

<<Annotation(cur, 3, ABC, cur, title & Desc, true)>>

<<Annotation("folder1\folder2\Grid2", 3,A,cur, Title & Description, true)>>

<<Annotation(current, 294, AB, cur, Title & Description, Top 19)>>

<<Annotation(current, 39, AB, cur, Title & Description & Author, Bottom 40)>>

文本框中的注释的行为

使用 "cur" 关键字时,网格文本行中的注释与文本框中的注释的行为不同。

  • 对于文本行,您可以使用 "cur" 关键字。

    例如,<<Annotation("Grid1", 1, A, cur, All, All, true)>>

  • 对于文本框,"cur" 关键字不会返回任何内容。因此,您要输入 <<Annotation("Grid1", 1, A, 1, All, All, true)>>