这是可以的,直接写一个打印按钮,然后后台写打印触发就可以了。- private void button1_Click(object sender, EventArgs e)
- {
- string file_name = @"..\..\RdlReport1.rdlx";
- GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(file_name));
- pageReport.Document.LocateDataSource += new LocateDataSourceEventHandler(LocateData);
- this._document = pageReport.Document;
- GrapeCity.ActiveReports.PrintExtension.Print(_document, true, true);
- }
复制代码
|