表示已绘制在报表上的框。
有关该类型所有成员的列表,参见 BoxObject 成员。
System.Object
CrystalDecisions.CrystalReports.Engine.EngineObjectBase
CrystalDecisions.CrystalReports.Engine.ReportObject
CrystalDecisions.CrystalReports.Engine.DrawingObject
BoxObject
[Visual Basic]
Public Class BoxObject Inherits DrawingObject Implements IDisposable
[C#]
public class BoxObject : DrawingObject, IDisposable
备注
该类使您可以检索信息和设置从 DrawingObject 类继承的一般格式选项。
示例
此示例通过 ReportObjects 集合的 Item 属性,按名称检索 ReportObject 对象,并将 ReportObject 转换为 BoxObject。
[VJ#]
static private BoxObject getBoxObject(String reportObjectName)
{
BoxObject box = null;
try
{
box =
(BoxObject)Report.get_ReportDefinition().get_ReportObjects()
.get_Item(reportObjectName);
}
catch (Exception e)
{
}
return box;
}
[Visual Basic]
Private Function GetBoxObject _
(ByVal reportObjectName As String) As BoxObject
Dim box As BoxObject
If TypeOf _
(Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)) Is BoxObject Then
box = _
Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)
GetBoxObject = box
Else : GetBoxObject = Nothing
End If
End Function
[C#]
private BoxObject GetBoxObject(string reportObjectName)
{
BoxObject box;
box =
section.ReportObjects[reportObjectName] as BoxObject;
return box;
}
要求
命名空间 CrystalDecisions.CrystalReports.Engine
程序集 CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
请参见
BoxObject 成员 | CrystalDecisions.CrystalReports.Engine 命名空间
©2005 Business Objects SA 保留所有权利。
| Business Objects SA http://www.china.businessobjects.com/ 支持服务 http://www.china.businessobjects.com/ |