????ASP.NET??????????????
???????????? ???????[ 2012/7/13 10:46:10 ] ????????
???????????£?
	//?????????????????????
	myReport ReportDoc = new myReport();
	ReportDoc.SetDataSource(ds);
	Crv.ReportSource = ReportDoc;
	 
	//??????????????
	CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new          CrystalDecisions.Shared.DiskFileDestinationOptions();
	ReportDoc.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
	string strFileName = server.MapPath("Output");
	switch (ddlFormat.SelectedItem.Text)
	{
	     case "Rich Text (RTF)":
	              ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.RichText;
	              DiskOpts.DiskFileName =strFileName + ".rtf";
	         break;
	     case "Portable Document (PDF)":
	              ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
	              DiskOpts.DiskFileName = strFileName + ".pdf";
	         break;
	     case "MS word (DOC)":
	              ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.WordForWindows;
	              DiskOpts.DiskFileName = strFileName + ".doc";
	         break;
	     case "MS excel (XLS)":
	              ReportDoc.ExportOptions.ExportFormatType =   CrystalDecisions.Shared.ExportFormatType.Excel;//
	              DiskOpts.DiskFileName = strFileName + ".xls";
	         break;
	     default:
	         break;
	}
	ReportDoc.ExportOptions.DestinationOptions = DiskOpts;
	ReportDoc.Export();
	 
	//???
	// ????????????  
	string strPrinterName;
	strPrinterName = @"Canon Bubble-Jet BJC-210SP";
	// ??????????
	PageMargins margins;
	margins = ReportDoc.PrintOptions.PageMargins;
	margins.bottomMargin = 250;
	margins.leftMargin = 350;
	margins.rightMargin = 350;
	margins.topMargin = 450;    
	ReportDoc.PrintOptions.ApplyPageMargins(margins);    
	//???????????
	ReportDoc.PrintOptions.PrinterName = strPrinterName;    
	// ???   // ??????????startPageN ??endPageN
	// ?????????0 ?????????????
	ReportDoc.PrintToPrinter(1?? false??0??0);
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com