回复 8楼难啃的骨头的帖子
可以把 ry 转换成 DataTable 中,再通过 viewer 的 LocateDataSource 进行赋值:
- private void Form1_Load(object sender, EventArgs e)
- {
- GrapeCity.ActiveReports.PageReport report1 = null;
- report1 = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(url));
- report1.Run();
- this.viewer1.LocateDataSource += new GrapeCity.ActiveReports.LocateDataSourceEventHandler(viewer1_LocateDataSource);
- }
- void viewer1_LocateDataSource(object sender, GrapeCity.ActiveReports.LocateDataSourceEventArgs args)
- {
- }
复制代码
DataTable 字段名称要和模板字段名称相同。
请尝试看能否解决你的问题。 |