0

我正在使用 ActiveReport3 进行自定义,我有一个为以下代码引发的异常。任何人都可以帮助...?请提供 ActiveReport3 的内容。这是代码...

public void grpHBillInformation_Format()
{
    slno=0;

                     if(((DataDynamics.ActiveReports.TextBox)rpt.Sections["grpHBillInformation"].Controls["txtModeofPayment1"]).Text =="1")
                     {
                            ((DataDynamics.ActiveReports.TextBox)rpt.Sections["grpHBillInformation"].Controls["txtModeofPayment1"]).Text = "Cash";
                     }
                     else
                     {
                            ((DataDynamics.ActiveReports.TextBox)rpt.Sections["grpHBillInformation"].Controls["txtModeofPayment1"]).Text = "Credit";
                     } 
                    if(((DataDynamics.ActiveReports.TextBox)rpt.Sections["grpHBillInformation"].Controls["txtCustomerfName1"]).Text!=" ")
                     {
                            **((DataDynamics.ActiveReports.TextBox)rpt.Sections["grpBHillInformation"].Controls["txtCustomerName1"]).Alignment=TextAlignment.Center;**
                     }

}

如果根本没有客户的第一名,我需要在此处对齐文本以使其居中。

4

1 回答 1

0

请张贴例外。只看代码,好像需要给出“TextAlignment.Center”的全名

于 2013-10-25T23:28:08.680 回答