求教:點擊頁面中的按鈕直接打印某個水晶報表的內容要怎么做啊?????
點擊頁面中的按鈕直接打印某個水晶報表的內容要怎么做啊?????--------------------编程问答-------------------- ::::等 --------------------编程问答-------------------- 风过无痕 --------------------编程问答-------------------- http://hi.baidu.com/%B4%F3%D1%DB%B8%F2%F3%A1/blog/item/f1a5713d6788bbef3d6d97e5.html --------------------编程问答-------------------- using CrystalDecisions.CrystalReports.Engine;
private void button1_Click(object sender, System.EventArgs e)
{
ReportDocument crReportDocument;
crReportDocument = new ReportDocument();
//Create an instance of a report
crReportDocument = new Chart();
//Use error handling in case an error occurs
try
{
//Set the printer name to print the report to. By default the sample
//report does not have a defult printer specified. This will tell the
//engine to use the specified printer to print the report. Print out
//a test page (from Printer properties) to get the correct value.
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
crReportDocument.PrintOptions.PrinterName = printDocument.PrinterSettings.PrinterName;
//Start the printing process. Provide details of the print job
//using the arguments.
crReportDocument.PrintToPrinter(1, true, 1, 1);
//Let the user know that the print job is completed
MessageBox.Show("Report finished printing!");
}
catch(Exception err)
{
MessageBox.Show(err.ToString());
}
}
注意 : 報表的名字是 Chart
--------------------编程问答-------------------- 楼上的,我用A.ASPX页面通过调用a.rpt文件生成的一个报表该如何直接打印呢?
平常的打印时:通过点击一个按钮,传递相关参数至A.ASPX页面,A.ASPX页面打开后即可看到生成的报表预览。点击报表上的打印可以在客户端打印。
我现在要实现水晶报表的批量打印,该如何是好?
补充:.NET技术 , C#