Pleasure resort of Gleam™

[CODE] private void CreatePdfDoc(string arg) { CmDeviceMgt_NTx Device = new CmDeviceMgt_NTx(); ReportDocument crDoc = new ReportDocument(); ExportOptions crOpt = new ExportOptions(); DiskFileDestinationOptions crDiskOpt = new DiskFileDestinationOptions(); DataSet ds = Device.PrintSelectedBox(arg); crDoc.Load(Server.MapPath(@"./conf_server_add_box_printlist_rpt.rpt")); crDoc.SetDataSource(ds); CrViewer1.ReportSource = crDoc; CrViewer1.SeparatePages = false; CrViewer1.DisplayGroupTree = false; CrViewer1.DisplayToolbar = false; string fname = @"C:\TEMP\evts.pdf"; crDiskOpt.DiskFileName = fname ; crOpt = crDoc.ExportOptions ; crOpt.DestinationOptions = crDiskOpt ; crOpt.ExportDestinationType = ExportDestinationType.DiskFile ; crOpt.ExportFormatType = ExportFormatType.PortableDocFormat ; crDoc.Export(); Response.ContentType = "application/pdf" ; Response.WriteFile(fname) ; Response.Flush(); Response.Close(); Response.End(); }[/CODE]

리포트를 만들때는 XML 스키마를 기준으로 만들고,
데이터는 위 소스처럼 동적으로 바인딩 한다.

Comment +0