protected override void Done() { base.Done(); Excel2007Export ooxmlExport = Export as Excel2007Export; // ooxmlFExport.Wysiwyg = cbWysiwyg.Checked; ooxmlExport.PageBreaks = cbPageBreaks.Checked; }
public override void Init(ExportBase export) { base.Init(export); MyRes res = new MyRes("Export,Xlsx"); Text = res.Get(""); Excel2007Export ooxmlExport = Export as Excel2007Export; // cbWysiwyg.Checked = ooxmlExport.Wysiwyg; cbPageBreaks.Checked = ooxmlExport.PageBreaks; }
/// <summary> /// The export button_ click. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void ExportButtonClick(object sender, EventArgs e) { var milestoneReportDal = new MilestoneReportDal(); var milestoneReportCommonInfo = milestoneReportDal.GetMilestoneReportCommonInfo(); var startDate = Convert.ToDateTime("01.09.2017"); var finishDate = Convert.ToDateTime("30.09.2017"); var dates_filter_type = 1; var case_id = 9; var milestoneReportData = milestoneReportDal.GetMilestoneReportData(startDate, finishDate, dates_filter_type, case_id, "12181", 20); var report = new Report(); report.Load(this.ReportTemplatePathTextBox.Text); report.RegisterData(milestoneReportCommonInfo, "CommonInfo"); report.RegisterData(milestoneReportData, "Data"); report.Prepare(); //// var xmlExport = new XMLExport { OpenAfterExport = true }; //// report.Export(xmlExport, "D:\\DupelReport.xml"); //// var pptExport = new PowerPoint2007Export{ OpenAfterExport = true }; //// report.Export(pptExport, "D:\\DupelReport.ppt"); var excelExport = new Excel2007Export { OpenAfterExport = true }; report.Export(excelExport, "D:\\DupelReport.xlsx"); ////var worldExport = new Word2007Export { OpenAfterExport = true }; ////report.Export(worldExport, "D:\\DupelReport.doc"); //var pdfExport = new PDFExport { OpenAfterExport = true }; //report.Export(pdfExport, @"D:\DupelReport.pdf"); }