复制代码 代码如下:
CrystalDecisions.CrystalReports.Engine.ReportDocument rd=new CrystalDecisions.CrystalReports.Engine.ReportDocument();
rd.Load(Server.MapPath("Crystalreport1.rpt"));
rd.PrintOptions.PrinterName="打印机名称";
rd.PrintToPrinter(1,true,0,0);
复制代码 代码如下:
foreach(string iprt in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
this.DropDownList1.Items.Add(iprt);
复制代码 代码如下:
myrpt.ExportOptions.ExportDestinationType=CrystalDecisions.Shared.ExportDestinationType.DiskFile;
myrpt.ExportOptions.ExportFormatType=CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
CrystalDecisions.Shared.DiskFileDestinationOptions opt=new CrystalDecisions.Shared.DiskFileDestinationOptions();
opt.DiskFileName=@"文件名";
myrpt.ExportOptions.DestinationOptions =opt;
myrpt.Export();
新闻热点
疑难解答
图片精选