CreateReportControl 方法在指定的已打开报表上创建一个控件。有关详细信息,请参阅 CreateControl 方法。
expression.CreateReportControl(ReportName, ControlType, Section, Parent, ColumnName, Left, Top, Width, Height)
expression 必需。返回“Applies To”列表中的一个对象的表达式。
ReportName 必需 String 型。字符串表达式,标识要在其上创建控件的已打开报表的名称。
ControlType 必需 AcControlType。要创建的控件类型。
| AcControlType 可以是下列 AcControlType 常量之一: |
| acBoundObjectFrame |
| acCheckBox |
| acComboBox |
| acCommandButton |
| acCustomControl |
| acImage |
| acLabel |
| acLine |
| acListBox |
| acObjectFrame |
| acOptionButton |
| acOptionGroup |
| acPage |
| acPageBreak |
| acRectangle |
| acSubform |
| acTabCtl |
| acTextBox |
| acToggleButton |
Section 可选 AcSection。将包含新控件的节。
| AcSection 可以是下列 AcSection 常量之一: |
| acDetail 默认 |
| acFooter |
| acGroupLevel1Footer |
| acGroupLevel1Header |
| acGroupLevel2Footer |
| acGroupLevel2Header |
| acHeader |
| acPageFooter |
| acPageHeader |
Parent 可选 Variant 型。字符串表达式,标识附属控件的父控件的名称。对于没有父控件的控件,可以为该参数使用零长度字符串,也可以将其省略。
ColumnName 可选 Variant 型。如果是数据绑定控件,则表示控件将要绑定到的字段的名称。
Left, Top 可选 Variant 型。数值表达式,标识控件左上角的坐标,以缇为单位。
Width, Height 可选 Variant 型。数值表达式,标识控件的宽度和高度,以缇为单位。