我需要在ActiveReports 3文件中添加一个DataGridView。当我添加控件时,它不会被识别为DataGridView,而是一个自定义控件。有人能帮我解决这个问题吗?
发布于 2011-09-01 12:19:24
可以将CustomControl.Control强制转换为DataGridView,以便通过包含节的控件的format事件以编程方式访问对象。在CustomControl.Control property's documentation topic中有一个这样做的例子。请注意,在该主题中,它使用ChartFX,但您将使用DataGridView。
然而,@LordHits关于在报告中使用DataGridView的评论是一个很好的评论。通常,您只需要将报告连接到相同的数据源,并使用相同的查询,然后让报告获取数据。您还可以轻松地将报告绑定到System.Data.DataSet。请参见帮助主题"How-To Section > Binding Reports to a Data Source > Using a Dataset" in the ActiveReports 3 User Guide。
Scott Willeke
GrapeCityhttps://stackoverflow.com/questions/7244922
复制相似问题