如何TextBox
在 ActiveReports 3.1 中获得控制权。当我使用 ActiveReport 6 或更高版本时,下一个代码就像一个魅力(我有Textbox
property Name
)"TextBox1"
但在 3.0 版本中它的代码不正确:
this.TextBox1.Text = "Test";
出现编译错误“没有 TextBox1 的定义”(在 6.0 中)它工作正常。如何强制此代码正确执行?这是来自 rpx 文件的代码
<?xml version="1.0" encoding="utf-16"?>
<ActiveReportsLayout Version="3.1" PrintWidth="9360" DocumentName="ARNet Document" ScriptLang="C#" MasterReport="0">
<StyleSheet>
<Style Name="Normal" Value="font-family: Arial; font-style: normal; text-decoration: none; font-weight: normal; font-size: 10pt; color: Black" />
<Style Name="Heading1" Value="font-size: 16pt; font-weight: bold" />
<Style Name="Heading2" Value="font-family: Times New Roman; font-size: 14pt; font-weight: bold; font-style: italic" />
<Style Name="Heading3" Value="font-size: 13pt; font-weight: bold" />
</StyleSheet>
<Sections>
<Section Type="PageHeader" Name="PageHeader1" Height="360" BackColor="16777215" />
<Section Type="Detail" Name="Detail1" Height="2880" BackColor="16777215">
<Control Type="AR.Field" Name="TextBox1" Left="1700.787" Top="1247.244" Width="1360.63" Height="340.1574" Text="TextBox1" />
</Section>
<Section Type="PageFooter" Name="PageFooter1" Height="360" BackColor="16777215" />
</Sections>
<ReportComponentTray />
<Script><![CDATA[public void Detail1_Format()
{
this.TextBox1.Text = "test";
}public void ActiveReport_ReportStart()
{
}
]]></Script>
<PageSettings />
<Parameters />
</ActiveReportsLayout>
这是错误