.NET MVC 打印出现白纸 我看到给的例子用方法 Document.Print(true, true, false); 但是根本没这个方法
有这个方法 Document.Printer.Print(); 但是打印出来是白纸
System.Drawing.Printing.PrintDocument fPrintDocument = new System.Drawing.Printing.PrintDocument();
var testReport = new PageReport(new FileInfo(Server.MapPath("~/AR/ARModel/CGRKOrder.rdlx")));
testReport.Report.Classes.Add(new GrapeCity.ActiveReports.PageReportModel.CodeClass() { ClassName = "CySoft.Utility.ARHelper", InstanceName = "ARHelper" });
testReport.Document.LocateDataSource += (sender, args) =>
{
var br = Td_Jh_1BLL.GetAR("2109265000000698");
if (br.Success)
{
var data = (List<Td_Jh_1_Query_DetailModel_AR>)br.Data;
args.Data = data;
}
else
{
args.Data = new List<Td_Jh_1_Query_DetailModel_AR>();
}
};
testReport.Run();
testReport.Document.Printer.Print(); //此方法打印出来是白纸
pageDocument.Print(true, true, false); //无此方法
|