//定義報表模板 private GridppReport Report = new GridppReport(); //載入報表模板數據 Report.LoadFromFile(GridppReportDemo.Utility.GetReportTemplatePath() + "program\ ...
//定義報表模板
private GridppReport Report = new GridppReport();
//載入報表模板數據
Report.LoadFromFile(GridppReportDemo.Utility.GetReportTemplatePath() + "program\\Sale detail of product.grf");
//設置與數據源的連接串,因為在設計時指定的資料庫路徑是絕對路徑
Report.DetailGrid.Recordset.ConnectionString = GridppReportDemo.Utility.GetDatabaseConnectionString();
//連接報表取數事件
Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(ReportInitialize);
Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecord);
//設定查詢顯示器關聯的報表
axGRDisplayViewer1.Report = Report;