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