TextBox
ActiveReports 3.1 でコントロールにアクセスするにはどうすればよいですか? ActiveReport 6以降を使用すると、次のコードは魅力のように機能します(プロパティを使用Textbox
し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>
ここにエラーがあります