CreateReportControl 方法在指定的已打開報(bào)表上創(chuàng)建一個(gè)控件。有關(guān)詳細(xì)信息,請(qǐng)參閱 CreateControl 方法。
expression.CreateReportControl(ReportName, ControlType, Section, Parent, ColumnName, Left, Top, Width, Height)
expression 必需。返回“應(yīng)用于”列表中的一個(gè)對(duì)象的表達(dá)式。
ReportName 必需 String 型。字符串表達(dá)式,標(biāo)識(shí)要在其上創(chuàng)建控件的已打開報(bào)表的名稱。
ControlType 必需 AcControlType。要?jiǎng)?chuàng)建的控件類型。
AcControlType 可以是下列 AcControlType 常量之一: |
acBoundObjectFrame |
acCheckBox |
acComboBox |
acCommandButton |
acCustomControl |
acImage |
acLabel |
acLine |
acListBox |
acObjectFrame |
acOptionButton |
acOptionGroup |
acPage |
acPageBreak |
acRectangle |
acSubform |
acTabCtl |
acTextBox |
acToggleButton |
Section 可選 AcSection。將包含新控件的節(jié)。
AcSection 可以是下列 AcSection 常量之一: |
acDetail 默認(rèn) |
acFooter |
acGroupLevel1Footer |
acGroupLevel1Header |
acGroupLevel2Footer |
acGroupLevel2Header |
acHeader |
acPageFooter |
acPageHeader |
Parent 可選 Variant 型。字符串表達(dá)式,標(biāo)識(shí)附屬控件的父控件的名稱。對(duì)于沒(méi)有父控件的控件,可以為該參數(shù)使用零長(zhǎng)度字符串,也可以將其省略。
ColumnName 可選 Variant 型。如果是數(shù)據(jù)綁定控件,則表示控件將要綁定到的字段的名稱。
Left, Top 可選 Variant 型。數(shù)值表達(dá)式,標(biāo)識(shí)控件左上角的坐標(biāo),以緹為單位。
Width, Height 可選 Variant 型。數(shù)值表達(dá)式,標(biāo)識(shí)控件的寬度和高度,以緹為單位。