本帖最后由 Lenka.Guo 于 2016-5-19 14:53 编辑
这是在单独加载一张报表到 private GrapeCity.ActiveReports.Viewer.Win.Viewer arViewer;控件的时候执行的加载代码
pageReport.Document.LocateDataSource += new LocateDataSourceEventHandler(OnLocateDataSource);
arViewer.LoadDocument(pageReport.Document);
这一部分是在执行委托执行的代码段,其中红色部分是否是对报表的设计数据源整体都修改了? 包括我从设计器跳过来后,关闭预览, 返回设计器的时候 这个时候整个设计器的数据源都发生了变化?
void OnLocateDataSource(object sender, LocateDataSourceEventArgs args)
{
args.Data = LoadDataSet().Tables[2];
}
|