public DevExpressPrinting(ArrayList _arrLabel, ArrayList _arrValue, ArrayList _arrLabel1, ArrayList _arrValue1, ArrayList _arrValue2, ArrayList _arrValue3, ArrayList _arrValue4, DevExpress.XtraPrinting.PrintingSystem aPrintDocument) { // // TODO: Add constructor logic here // sClass = true; arrLabel = _arrLabel; arrValue = _arrValue; arrLabel1 = _arrLabel1; arrValue1 = _arrValue1; arrValue2 = _arrValue2; arrValue3 = _arrValue3; arrValue4 = _arrValue4; ThePrintSystem = aPrintDocument; PageWidth = ThePrintSystem.PageSettings.UsablePageSize.Width; PageHeight = ThePrintSystem.PageSettings.UsablePageSize.Height; TopMargin = ThePrintSystem.PageMargins.Top; BottomMargin = ThePrintSystem.PageMargins.Bottom; }
/// <summary> /// 预览 /// </summary> public bool DoPreview2(string sCaption, DevExpress.XtraPrinting.PrintingSystem ps) { //if (ChechRight(sCaption) == false) // return false; Cursor currentCursor = Cursor.Current; Cursor.Current = Cursors.WaitCursor; try { // PreviewLocalizer.Active = plZer; DevExpress.XtraPrinting.Localization.PreviewLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraPrintingLocalizationCHS(); //标题 PageHeaderFooter phf = ps.Links[0].PageHeaderFooter as PageHeaderFooter; phf.Header.Content.Clear(); phf.Header.Content.AddRange(new string[] { SysVar.strCompany, sCaption, "" }); ps.Links[0].CreateDocument(); ps.Links[0].ShowPreview(); Cursor.Current = currentCursor; } catch (Exception ex) { MessageBox.Show(ex.Message, "错误"); return(false); } return(true); }
private void Export_All_PivotGrid() { PivotGridControl[] grids = new PivotGridControl[] { pivotGridControl1 }; DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrintingLinks.CompositeLink compositeLink = new DevExpress.XtraPrintingLinks.CompositeLink(ps); // Show the Document Map toolbar button and menu item. ps.SetCommandVisibility(PrintingSystemCommand.Open, CommandVisibility.All); // Make the "Export to Csv" and "Export to Txt" commands visible. ps.SetCommandVisibility(new PrintingSystemCommand[] { PrintingSystemCommand.ExportCsv, PrintingSystemCommand.ExportTxt, PrintingSystemCommand.ExportXlsx, PrintingSystemCommand.ExportDocx, PrintingSystemCommand.ExportXls }, CommandVisibility.All); compositeLink.PrintingSystem = ps; foreach (PivotGridControl grid in grids) { PrintableComponentLink link = new PrintableComponentLink(); link.Component = grid; //compositeLink.Links.Add(link); compositeLink.Links.AddRange(new object[] { link }); } string ReportName = "Daily_Status_Report"; string folderPath = "C:\\Temp\\"; string Path1 = folderPath + DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss") + "-" + ReportName + ".xlsx"; compositeLink.PrintingSystem.ExportToXlsx(Path1, new XlsxExportOptions() { ExportMode = XlsxExportMode.SingleFilePageByPage }); compositeLink.ShowPreview(); compositeLink.CreatePageForEachLink(); }
public void Print() { try { nPrint = true; this.bandedGridView1.RefreshData(); SaveFix(); PrintingSystem print = new DevExpress.XtraPrinting.PrintingSystem(); PrintableComponentLink link = new PrintableComponentLink(print); print.Links.Add(link); link.Component = this.gridControl1; // 当前的表格控件 string _PrintHeader = this.Text; // 这里要根据业务修改 PageHeaderFooter phf = link.PageHeaderFooter as PageHeaderFooter; phf.Header.Content.Clear(); phf.Header.Content.AddRange(new string[] { "", _PrintHeader, "" }); phf.Header.Font = new System.Drawing.Font("宋体", 14, System.Drawing.FontStyle.Bold); phf.Header.LineAlignment = BrickAlignment.Center; link.CreateDocument(); print.PreviewFormEx.ShowDialog(); print.PreviewFormEx.FormClosed += new FormClosedEventHandler(PreviewFormEx_FormClosed); } finally { ClearFix(); } }
/// <summary> /// 打印GridControl /// </summary> /// <param name="control">需要被打印的GridControl</param> public static void PrintGridControl(GridControl control) { DevExpress.XtraPrintingLinks.CompositeLink compositeLink = new DevExpress.XtraPrintingLinks.CompositeLink(); DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); compositeLink.PrintingSystem = ps; compositeLink.Landscape = true; compositeLink.PaperKind = System.Drawing.Printing.PaperKind.A4; DevExpress.XtraPrinting.PrintableComponentLink link = new DevExpress.XtraPrinting.PrintableComponentLink(ps); ps.PageSettings.Landscape = true; // PageHeaderFooter phf = compositeLink.PageHeaderFooter as PageHeaderFooter; //设置页眉 //phf.Header.Content.Clear(); //phf.Header.Content.AddRange(new string[] { "", _PrintHeader, "" }); //phf.Header.Font = new System.Drawing.Font("宋体", 14, System.Drawing.FontStyle.Bold); //phf.Header.LineAlignment = BrickAlignment.Center; //设置页脚 //phf.Footer.Content.Clear(); //phf.Footer.Content.AddRange(new string[] { "", "", "1" }); //phf.Footer.Font = new System.Drawing.Font("宋体", 9, System.Drawing.FontStyle.Regular); //phf.Footer.LineAlignment = BrickAlignment.Center; link.Component = control; compositeLink.Links.Add(link); link.CreateDocument(); //建立文档 ps.PreviewFormEx.Show(); //进行预览 }
/// <summary> /// 显示打印预览窗体 /// </summary> /// <param name="component">可以是GridContronl或者TreeList或者其他</param> /// <param name="headerTitle">标题</param> /// <param name="landscape">true表示横向,false表示纵向</param> /// <param name="headerFont">标题字体</param> public static void ShowPreview(IPrintable component, string headerTitle, bool landscape, Font headerFont) { PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrinting.PrintableComponentLink link = new DevExpress.XtraPrinting.PrintableComponentLink(ps); ps.Links.Add(link); link.Component = component; //这里可以是可打印的部件 PageHeaderFooter phf = link.PageHeaderFooter as PageHeaderFooter; phf.Header.Content.AddRange(new string[] { "", headerTitle, "" }); phf.Header.Font = headerFont; phf.Header.LineAlignment = BrickAlignment.Center; phf.Footer.Content.AddRange(new string[] { DateTime.Now.ToString("yyyy-MM-dd"), "", "[Page # of Pages #]" }); phf.Footer.LineAlignment = BrickAlignment.Center; link.Landscape = landscape; link.CreateDocument(); //建立文档 //ps.PreviewFormEx.Menu.MenuItems[0].MenuItems.RemoveAt(6) ; //ps.PreviewFormEx.Menu.MenuItems[0].MenuItems.RemoveAt(5); //ps.PreviewFormEx.Menu.MenuItems[0].MenuItems.RemoveAt(4); //ps.PreviewFormEx.PrintPreviewBar.Buttons.RemoveAt(4); //ps.PreviewFormEx.PrintPreviewBar.Buttons.RemoveAt(23); //ps.PreviewFormEx.PrintPreviewBar.Buttons.RemoveAt(23);lgm ps.PreviewFormEx.Text = headerTitle; ps.PreviewFormEx.Show(); //进行预览 }
/// <summary> /// 打印操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click_1(object sender, EventArgs e) { try { //this.layoutControl1.ShowPrintPreview(); //this.layoutControl1.Print(); //layoutControl1.ExportToXls("C:\\1.xls"); //声明PrintingSystem PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrinting.PrintableComponentLink link = null; link = new DevExpress.XtraPrinting.PrintableComponentLink(ps); ps.Links.Add(link); link.Component = layoutControl1; //将layoutcontrol控件和打印组件连接 link.CreateDocument(); //建立文档 ps.PageSettings.PaperKind = PaperKind.A4; //设置表格边距 ps.PageSettings.TopMargin = 2; ps.PageSettings.BottomMargin = 2; ps.PageSettings.LeftMargin = 2; ps.PageSettings.RightMargin = 2; //ps.PrintDlg();//调打印设置窗体 //ps.PreviewFormEx.Show();//预览窗体 ps.Print(); } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex); } }
public static void ExportXls(IPrintable Printer, string printCaption, Control.ControlCollection Controls) { if (Printer == null) { return; } OnBestFitColumns(Controls); PrintCaption = printCaption; DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrinting.PrintableComponentLink link = new DevExpress.XtraPrinting.PrintableComponentLink(ps); link.Component = Printer; link.CreateReportHeaderArea += new DevExpress.XtraPrinting.CreateAreaEventHandler(printableComponentLink_CreateReportHeaderArea); link.PaperKind = System.Drawing.Printing.PaperKind.A4; link.Margins.Bottom = link.Margins.Left = link.Margins.Right = link.Margins.Top = 50; link.CreateDocument(); string fileName = string.Empty; SaveFileDialog save = new SaveFileDialog(); save.Filter = "Exel 2013 (*.xls)|*.xls"; if (save.ShowDialog() == System.Windows.Forms.DialogResult.OK) { fileName = save.FileName; } if (string.IsNullOrEmpty(fileName)) { return; } link.ExportToXls(fileName); }
private void toolStripButton11_Click(object sender, EventArgs e) { PrintingSystem print = new DevExpress.XtraPrinting.PrintingSystem(); PrintableComponentLink link = new PrintableComponentLink(print); print.Links.Add(link); link.Component = gridControl1; //这里可以是可打印的部件 link.Landscape = true; //是否横向打印 link.PaperKind = System.Drawing.Printing.PaperKind.A4; //纸张类型 link.PaperKind = System.Drawing.Printing.PaperKind.A4; //纸张类型 link.Margins.Left = 6; link.Margins.Right = 6; string _PrintHeader = "就诊登记查询"; PageHeaderFooter phf = link.PageHeaderFooter as PageHeaderFooter; phf.Header.Content.Clear(); phf.Header.Content.AddRange(new string[] { "", _PrintHeader, "" }); phf.Header.Font = new System.Drawing.Font("宋体", 14, System.Drawing.FontStyle.Bold); phf.Header.LineAlignment = BrickAlignment.Center; //phf.Footer.Content.Clear(); //phf.Footer.Content.AddRange(new string[] { "", richTextBox1.Text, "" }); //phf.Footer.Content.AddRange(new string[] { "", "dddddd", "" }); //phf.Footer.Font = new System.Drawing.Font("宋体", 9, System.Drawing.FontStyle.Regular); //phf.Footer.LineAlignment = BrickAlignment.None; link.CreateDocument(); //建立文档 print.PreviewFormEx.Show(); //进行预览 }
private void btnPrint_Click(object sender, EventArgs e) { DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrinting.PrintableComponentLink pcl = new DevExpress.XtraPrinting.PrintableComponentLink(ps); pcl.CreateReportHeaderArea += this.pcl_CreateReportHeaderArea; pcl.Component = gridIssues; pcl.Landscape = true; pcl.CreateDocument(); ps.PreviewFormEx.ShowDialog(); }
private void Export_Grid() { SplashScreenManager.ShowForm(this, typeof(Ordermanagement_01.Masters.WaitForm1), true, true, false); try { DevExpress.XtraPrinting.PrintingSystem ps_1 = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrintingLinks.CompositeLink compositeLink_1 = new DevExpress.XtraPrintingLinks.CompositeLink(ps_1); DevExpress.XtraPrinting.PrintableComponentLink link_1 = new DevExpress.XtraPrinting.PrintableComponentLink(); DevExpress.XtraPrinting.PrintableComponentLink link_2 = new DevExpress.XtraPrinting.PrintableComponentLink(); // Show the Document Map toolbar button and menu item. ps_1.SetCommandVisibility(PrintingSystemCommand.Open, CommandVisibility.All); // Make the "Export to Csv" and "Export to Txt" commands visible. ps_1.SetCommandVisibility(new PrintingSystemCommand[] { PrintingSystemCommand.ExportCsv, PrintingSystemCommand.ExportTxt, PrintingSystemCommand.ExportXlsx, PrintingSystemCommand.ExportDocx, PrintingSystemCommand.ExportXls }, CommandVisibility.All); compositeLink_1.PrintingSystem = ps_1; link_1.Component = Grid_User_Summary; link_1.PaperName = "Niranjan"; link_2.Component = pivotGridControl2; compositeLink_1.Links.AddRange(new object[] { link_1, link_2 }); string ReportName = "Summary-Report"; string folderPath = "C:\\Temp\\"; string Path1 = folderPath + DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss") + "-" + ReportName + ".xlsx"; // compositeLink.ShowPreview(); compositeLink_1.CreatePageForEachLink(); // this is for Creating excel sheet name ps_1.XlSheetCreated += PrintingSystem_XlSheetCreated_1; compositeLink_1.PrintingSystem.ExportToXlsx(Path1, new XlsxExportOptions() { ExportMode = XlsxExportMode.SingleFilePageByPage, ExportHyperlinks = false, TextExportMode = TextExportMode.Text }); System.Diagnostics.Process.Start(Path1); } catch (Exception ex) { //Close Wait Form SplashScreenManager.CloseForm(false); MessageBox.Show("Error Occured Please Check With Administrator"); } finally { //Close Wait Form SplashScreenManager.CloseForm(false); } }
private void btnPrint_Click(object sender, EventArgs e) { DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrinting.PrintableComponentLink pcl = new DevExpress.XtraPrinting.PrintableComponentLink(ps); pcl.CreateReportHeaderArea += this.pcl_CreateReportHeaderArea; pcl.Component = gridControl1; pcl.Landscape = true; pcl.CreateDocument(); ps.PreviewFormEx.ShowDialog(); }
public DevExpressPrinting(ArrayList _arrLabel, ArrayList _arrValue, DevExpress.XtraPrinting.PrintingSystem aPrintDocument) { // // TODO: Add constructor logic here // arrLabel = _arrLabel; arrValue = _arrValue; ThePrintSystem = aPrintDocument; PageWidth = ThePrintSystem.PageSettings.UsablePageSize.Width; PageHeight = ThePrintSystem.PageSettings.UsablePageSize.Height; TopMargin = ThePrintSystem.PageMargins.Top; BottomMargin = ThePrintSystem.PageMargins.Bottom; }
private void Export_All_PivotGrid() { GridControl[] grids = new GridControl[] { Grd_Dash_Emp_efficency, grd_Targetorder, Grid_Error_Details }; DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrintingLinks.CompositeLink compositeLink = new DevExpress.XtraPrintingLinks.CompositeLink(ps); // Show the Document Map toolbar button and menu item. ps.SetCommandVisibility(PrintingSystemCommand.Open, CommandVisibility.All); // Make the "Export to Csv" and "Export to Txt" commands visible. ps.SetCommandVisibility(new PrintingSystemCommand[] { PrintingSystemCommand.ExportCsv, PrintingSystemCommand.ExportTxt, PrintingSystemCommand.ExportXlsx, PrintingSystemCommand.ExportDocx, PrintingSystemCommand.ExportXls }, CommandVisibility.All); compositeLink.PrintingSystem = ps; foreach (GridControl grid in grids) { PrintableComponentLink link = new PrintableComponentLink(); link.Component = grid; //compositeLink.Links.Add(link); compositeLink.Links.AddRange(new object[] { link }); } string ReportName = "Accuracy_Deatils"; string folderPath = "C:\\Temp\\"; string Path1 = folderPath + DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss") + "-" + ReportName + ".xlsx"; //Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application(); //string myPath = @"15-02-2019-Accuracy_Deatils.xlsx"; //excelApp.Workbooks.Open(myPath); //// Get Worksheet //Microsoft.Office.Interop.Excel.Worksheet worksheet = excelApp.Worksheets[1]; //int rowIndex = 2; int colIndex = 2; //for (int i = 0; i < 10; i++) //{ // excelApp.Cells[rowIndex, colIndex] = "\r123"; //} //excelApp.Visible = false; compositeLink.PrintingSystem.ExportToXlsx(Path1, new XlsxExportOptions() { ExportMode = XlsxExportMode.SingleFilePageByPage }); compositeLink.ShowPreview(); compositeLink.CreatePageForEachLink(); }
private void PrintDetail_ExA() { PrintingSystem print = new DevExpress.XtraPrinting.PrintingSystem(); PrintableComponentLink link = new PrintableComponentLink(print); print.Links.Add(link); link.Component = detailGrid;//这里可以是可打印的部件 string _PrintHeader = "倒库明细表"; PageHeaderFooter phf = link.PageHeaderFooter as PageHeaderFooter; phf.Header.Content.Clear(); phf.Header.Content.AddRange(new string[] { "", _PrintHeader, "" }); phf.Header.Font = new System.Drawing.Font("宋体", 14, System.Drawing.FontStyle.Bold); phf.Header.LineAlignment = BrickAlignment.Center; link.CreateDocument(); //建立文档 print.PreviewFormEx.Show(); //进行预览 }
/// <summary> /// 打印 /// </summary> public bool DoPrint(string sCaption, PreviewLocalizer plZer, DevExpress.XtraPrinting.PrintingSystem ps) { //if (ChechRight(sCaption) == false) // return false; try { PreviewLocalizer.Active = plZer; ps.PrintDlg(); //ps.Links[0].PrintDlg(); } catch (Exception ex) { MessageBox.Show(ex.Message, "错误"); return(false); } return(true); }
/// <summary> /// 打印数据表格 /// </summary> /// <param name="_PrintHeader">标题</param> /// <param name="gridControl">数据表控件</param> /// <param name="papgerKind">纸张类型</param> public static void PrintGridData(string _PrintHeader, IPrintable obj, PaperKind papgerKind) { PrintingSystem print = new DevExpress.XtraPrinting.PrintingSystem(); // print.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4; PrintableComponentLink link = new PrintableComponentLink(print); print.Links.Add(link); link.Component = obj;//这里可以是可打印的部件 PageHeaderFooter phf = link.PageHeaderFooter as PageHeaderFooter; phf.Header.Content.Clear(); phf.Header.Content.AddRange(new string[] { "", _PrintHeader, "" }); phf.Header.Font = new System.Drawing.Font("宋体", 14, System.Drawing.FontStyle.Bold); phf.Header.LineAlignment = BrickAlignment.Center; link.CreateDocument(); //建立文档 print.PreviewFormEx.PrintingSystem.PageSettings.PaperKind = papgerKind; print.PreviewFormEx.Show(); //进行预览 }
// Export Error Desc Chart private void Export_Error_On_User() { load_Progressbar.Start_progres(); DevExpress.XtraPrinting.PrintingSystem ps2 = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrintingLinks.CompositeLink cl_2 = new DevExpress.XtraPrintingLinks.CompositeLink(ps2); DevExpress.XtraPrinting.PrintableComponentLink pclChart2 = new DevExpress.XtraPrinting.PrintableComponentLink(); chartControl3.Visible = true; pclChart2.Component = chartControl3; cl_2.PaperKind = System.Drawing.Printing.PaperKind.A3; cl_2.Landscape = true; cl_2.Margins.Right = 40; cl_2.Margins.Left = 40; cl_2.Links.AddRange(new object[] { pclChart2 }); cl_2.ShowPreviewDialog(); }
private void m_cmd_xuat_pdf_Click(object sender, EventArgs e) { try { DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); CompositeLink cl = new CompositeLink(ps); PrintableComponentLink pclChart = new PrintableComponentLink(); PrintableComponentLink pclPivot = new PrintableComponentLink(); pclChart.Component = chartControl1; pclPivot.Component = m_pivot_ty_le_qua_mon; cl.Links.AddRange(new object[] { pclChart, pclPivot }); cl.ShowPreviewDialog(); cl.PrintingSystem.ExportToPdf(Application.StartupPath + "\\..\\..\\BaoCao.pdf"); } catch { MessageBox.Show("Đã xảy ra lỗi hệ thống!"); } }
private void m_cmd_xuat_pdf_Click(object sender, EventArgs e) { try { DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); CompositeLink cl = new CompositeLink(ps); PrintableComponentLink pclChart = new PrintableComponentLink(); PrintableComponentLink pclPivot = new PrintableComponentLink(); pclChart.Component = m_chart_gpa_cpa; pclPivot.Component = m_pivot_kq_sinh_vien; cl.Links.AddRange(new object[] { pclChart, pclPivot }); cl.ShowPreviewDialog(); cl.PrintingSystem.ExportToPdf(Application.StartupPath + "\\..\\..\\CPA_GPA.pdf"); } catch (Exception v) { MessageBox.Show("Đã xảy ra lỗi hệ thống!"); } }
private void Export_Error_Tab() { load_Progressbar.Start_progres(); DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrintingLinks.CompositeLink cl = new DevExpress.XtraPrintingLinks.CompositeLink(ps); DevExpress.XtraPrinting.PrintableComponentLink pclChart = new DevExpress.XtraPrinting.PrintableComponentLink(); chartControl1.Visible = true; pclChart.Component = chartControl1; cl.PaperKind = System.Drawing.Printing.PaperKind.A4; cl.Landscape = true; cl.Margins.Right = 40; cl.Margins.Left = 40; cl.Margins.Top = 40; cl.Margins.Bottom = 40; cl.Links.AddRange(new object[] { pclChart }); cl.ShowPreviewDialog(); }
public static void PreviewReport(IPrintable Printer, string printCaption, Control.ControlCollection Controls) { if (Printer == null) { return; } OnBestFitColumns(Controls); PrintCaption = printCaption; DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrinting.PrintableComponentLink link = new DevExpress.XtraPrinting.PrintableComponentLink(ps); link.Component = Printer; link.PaperKind = System.Drawing.Printing.PaperKind.A4; link.CreateReportHeaderArea += new DevExpress.XtraPrinting.CreateAreaEventHandler(printableComponentLink_CreateReportHeaderArea); link.CreateReportFooterArea += new CreateAreaEventHandler(printableComponentLink_CreateReportFooterArea); link.Margins.Bottom = link.Margins.Left = link.Margins.Right = link.Margins.Top = 50; link.CreateDocument(); link.ShowPreview(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); DevExpress.XtraPivotGrid.PivotGridGroup pivotGridGroup1 = new DevExpress.XtraPivotGrid.PivotGridGroup(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RPIncomeAnalysis)); DevExpress.XtraPivotGrid.PivotGridGroup pivotGridGroup2 = new DevExpress.XtraPivotGrid.PivotGridGroup(); DevExpress.XtraPivotGrid.PivotGridGroup pivotGridGroup3 = new DevExpress.XtraPivotGrid.PivotGridGroup(); DevExpress.XtraPivotGrid.PivotGridGroup pivotGridGroup4 = new DevExpress.XtraPivotGrid.PivotGridGroup(); this.CurrentGridIncomeAnalysis = new DevExpress.XtraPivotGrid.PivotGridControl(); this.pv2NettAmount = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField7 = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField8 = new DevExpress.XtraPivotGrid.PivotGridField(); this.v2TargetAmount = new DevExpress.XtraPivotGrid.PivotGridField(); this.TargetPercent = new DevExpress.XtraPivotGrid.PivotGridField(); this.DayMonthEnd = new DevExpress.XtraPivotGrid.PivotGridField(); this.DayAvg = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField14 = new DevExpress.XtraPivotGrid.PivotGridField(); this.colTest = new DevExpress.XtraPivotGrid.PivotGridField(); this.label63 = new System.Windows.Forms.Label(); this.cmbCategory = new DevExpress.XtraEditors.ImageComboBoxEdit(); this.label2 = new System.Windows.Forms.Label(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.PRINT1 = new DevExpress.XtraEditors.HyperLinkEdit(); this.printingSystem1 = new DevExpress.XtraPrinting.PrintingSystem(this.components); this.printableComponentLink1 = new DevExpress.XtraPrinting.PrintableComponentLink(this.components); this.printableComponentLink2 = new DevExpress.XtraPrinting.PrintableComponentLink(this.components); this.printableComponentLink3 = new DevExpress.XtraPrinting.PrintableComponentLink(this.components); this.printableComponentLink4 = new DevExpress.XtraPrinting.PrintableComponentLink(this.components); this.hyperLinkEdit1 = new DevExpress.XtraEditors.HyperLinkEdit(); this.PrevGridIncomeAnalysis = new DevExpress.XtraPivotGrid.PivotGridControl(); this.pivotGridField1 = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField3 = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField4 = new DevExpress.XtraPivotGrid.PivotGridField(); this.vTargetAmt = new DevExpress.XtraPivotGrid.PivotGridField(); this.TargetAmt = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField13 = new DevExpress.XtraPivotGrid.PivotGridField(); this.TestTargetAmt = new DevExpress.XtraPivotGrid.PivotGridField(); this.label3 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.hyperLinkEdit2 = new DevExpress.XtraEditors.HyperLinkEdit(); this.btn_Add = new DevExpress.XtraEditors.SimpleButton(); this.btn_Del = new DevExpress.XtraEditors.SimpleButton(); this.pvGrandTotal10Days = new DevExpress.XtraPivotGrid.PivotGridControl(); this.pivotGridField16 = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField17 = new DevExpress.XtraPivotGrid.PivotGridField(); this.ThirdGridIncomeAnalysis = new DevExpress.XtraPivotGrid.PivotGridControl(); this.pivotGridField11 = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField12 = new DevExpress.XtraPivotGrid.PivotGridField(); this.pivotGridField9 = new DevExpress.XtraPivotGrid.PivotGridField(); this.cmbMonth = new System.Windows.Forms.ComboBox(); this.label4 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.CurrentGridIncomeAnalysis)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cmbCategory.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PRINT1.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.hyperLinkEdit1.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PrevGridIncomeAnalysis)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.hyperLinkEdit2.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pvGrandTotal10Days)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ThirdGridIncomeAnalysis)).BeginInit(); this.SuspendLayout(); // // CurrentGridIncomeAnalysis // this.CurrentGridIncomeAnalysis.Cursor = System.Windows.Forms.Cursors.Default; this.CurrentGridIncomeAnalysis.Fields.AddRange(new DevExpress.XtraPivotGrid.PivotGridField[] { this.pv2NettAmount, this.pivotGridField7, this.pivotGridField8, this.v2TargetAmount, this.TargetPercent, this.DayMonthEnd, this.DayAvg, this.pivotGridField14, this.colTest}); this.CurrentGridIncomeAnalysis.Groups.AddRange(new DevExpress.XtraPivotGrid.PivotGridGroup[] { pivotGridGroup1}); this.CurrentGridIncomeAnalysis.Location = new System.Drawing.Point(0, 271); this.CurrentGridIncomeAnalysis.Name = "CurrentGridIncomeAnalysis"; this.CurrentGridIncomeAnalysis.OptionsCustomization.AllowDrag = false; this.CurrentGridIncomeAnalysis.OptionsCustomization.AllowExpand = false; this.CurrentGridIncomeAnalysis.OptionsDataField.Area = DevExpress.XtraPivotGrid.PivotDataArea.RowArea; this.CurrentGridIncomeAnalysis.OptionsDataField.AreaIndex = 1; this.CurrentGridIncomeAnalysis.OptionsPrint.UsePrintAppearance = true; this.CurrentGridIncomeAnalysis.OptionsView.ShowDataHeaders = false; this.CurrentGridIncomeAnalysis.OptionsView.ShowFilterHeaders = false; this.CurrentGridIncomeAnalysis.OptionsView.ShowRowGrandTotals = false; this.CurrentGridIncomeAnalysis.Size = new System.Drawing.Size(960, 156); this.CurrentGridIncomeAnalysis.TabIndex = 1; this.CurrentGridIncomeAnalysis.Click += new System.EventHandler(this.CurrentGridIncomeAnalysis_Click); this.CurrentGridIncomeAnalysis.CustomSummary += new DevExpress.XtraPivotGrid.PivotGridCustomSummaryEventHandler(this.CurrentGridIncomeAnalysis_CustomSummary); // // pv2NettAmount // this.pv2NettAmount.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.pv2NettAmount.AreaIndex = 0; this.pv2NettAmount.Caption = "Branch Sales"; this.pv2NettAmount.CellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pv2NettAmount.FieldName = "mNettAmount"; this.pv2NettAmount.Name = "pv2NettAmount"; this.pv2NettAmount.TotalCellFormat.FormatString = "f2"; this.pv2NettAmount.TotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pv2NettAmount.TotalValueFormat.FormatString = "f2"; this.pv2NettAmount.TotalValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pv2NettAmount.ValueFormat.FormatString = "f2"; this.pv2NettAmount.ValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pv2NettAmount.Width = 80; // // pivotGridField7 // this.pivotGridField7.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.pivotGridField7.AreaIndex = 0; this.pivotGridField7.Caption = "Branch"; this.pivotGridField7.FieldName = "strBranchCode"; this.pivotGridField7.Name = "pivotGridField7"; this.pivotGridField7.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField7.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField7.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField7.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField7.Width = 80; // // pivotGridField8 // this.pivotGridField8.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.pivotGridField8.AreaIndex = 1; this.pivotGridField8.Caption = "Branch Sales"; this.pivotGridField8.FieldName = "mTotalAmount"; this.pivotGridField8.Name = "pivotGridField8"; this.pivotGridField8.Visible = false; this.pivotGridField8.Width = 80; // // v2TargetAmount // this.v2TargetAmount.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.v2TargetAmount.AreaIndex = 2; this.v2TargetAmount.Caption = "Amount - Target"; this.v2TargetAmount.Name = "v2TargetAmount"; this.v2TargetAmount.SummaryType = DevExpress.Data.PivotGrid.PivotSummaryType.Custom; this.v2TargetAmount.UnboundFieldName = "pv2TargetAmount"; this.v2TargetAmount.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; // // TargetPercent // this.TargetPercent.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.TargetPercent.AreaIndex = 2; this.TargetPercent.Caption = "% of Target"; this.TargetPercent.CellFormat.FormatString = "p"; this.TargetPercent.CellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.TargetPercent.Name = "TargetPercent"; this.TargetPercent.SummaryDisplayType = DevExpress.Data.PivotGrid.PivotSummaryDisplayType.PercentVariation; this.TargetPercent.SummaryType = DevExpress.Data.PivotGrid.PivotSummaryType.Custom; this.TargetPercent.TotalCellFormat.FormatString = "p"; this.TargetPercent.TotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.TargetPercent.TotalValueFormat.FormatString = "p"; this.TargetPercent.TotalValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.TargetPercent.ValueFormat.FormatString = "p"; this.TargetPercent.ValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.TargetPercent.Visible = false; // // DayMonthEnd // this.DayMonthEnd.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.DayMonthEnd.AreaIndex = 3; this.DayMonthEnd.Caption = "Days To Month End"; this.DayMonthEnd.Name = "DayMonthEnd"; this.DayMonthEnd.SummaryType = DevExpress.Data.PivotGrid.PivotSummaryType.Min; // // DayAvg // this.DayAvg.Appearance.ValueTotal.ForeColor = System.Drawing.Color.Black; this.DayAvg.Appearance.ValueTotal.Options.UseForeColor = true; this.DayAvg.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.DayAvg.AreaIndex = 4; this.DayAvg.Caption = "Daily Average"; this.DayAvg.Name = "DayAvg"; this.DayAvg.SummaryType = DevExpress.Data.PivotGrid.PivotSummaryType.Custom; this.DayAvg.TotalCellFormat.FormatString = "f2"; this.DayAvg.TotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.DayAvg.TotalValueFormat.FormatString = "f2"; this.DayAvg.TotalValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.DayAvg.UnboundFieldName = "DailyAvg"; this.DayAvg.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; this.DayAvg.ValueFormat.FormatString = "f2"; this.DayAvg.ValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; // // pivotGridField14 // this.pivotGridField14.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.pivotGridField14.AreaIndex = 0; this.pivotGridField14.Caption = "Month"; this.pivotGridField14.FieldName = "dtMonth"; this.pivotGridField14.Name = "pivotGridField14"; this.pivotGridField14.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField14.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField14.Width = 80; // // colTest // this.colTest.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.colTest.AreaIndex = 1; this.colTest.Caption = "% of Target"; this.colTest.CellFormat.FormatString = "P"; this.colTest.CellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.colTest.Name = "colTest"; this.colTest.SummaryType = DevExpress.Data.PivotGrid.PivotSummaryType.Custom; // // label63 // this.label63.BackColor = System.Drawing.Color.Transparent; this.label63.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label63.Location = new System.Drawing.Point(547, 10); this.label63.Name = "label63"; this.label63.Size = new System.Drawing.Size(56, 16); this.label63.TabIndex = 36; this.label63.Text = "Category"; // // cmbCategory // this.cmbCategory.EditValue = "cbGIROStatus"; this.cmbCategory.Location = new System.Drawing.Point(608, 8); this.cmbCategory.Name = "cmbCategory"; this.cmbCategory.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.cmbCategory.Properties.LookAndFeel.UseDefaultLookAndFeel = false; this.cmbCategory.Size = new System.Drawing.Size(200, 20); this.cmbCategory.TabIndex = 35; this.cmbCategory.SelectedValueChanged += new System.EventHandler(this.cmbCategory_SelectedValueChanged); // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Location = new System.Drawing.Point(0, 253); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(112, 16); this.label2.TabIndex = 38; this.label2.Text = "Current Month Sales"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Magenta; this.imageList1.Images.SetKeyName(0, ""); this.imageList1.Images.SetKeyName(1, ""); this.imageList1.Images.SetKeyName(2, ""); this.imageList1.Images.SetKeyName(3, ""); this.imageList1.Images.SetKeyName(4, ""); this.imageList1.Images.SetKeyName(5, ""); this.imageList1.Images.SetKeyName(6, ""); // // PRINT1 // this.PRINT1.EditValue = "PRINT"; this.PRINT1.Location = new System.Drawing.Point(168, 432); this.PRINT1.Name = "PRINT1"; this.PRINT1.Properties.Appearance.BackColor = System.Drawing.SystemColors.Control; this.PRINT1.Properties.Appearance.Options.UseBackColor = true; this.PRINT1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; this.PRINT1.Size = new System.Drawing.Size(40, 18); this.PRINT1.TabIndex = 139; this.PRINT1.OpenLink += new DevExpress.XtraEditors.Controls.OpenLinkEventHandler(this.PRINT1_OpenLink); // // printingSystem1 // this.printingSystem1.Links.AddRange(new object[] { this.printableComponentLink1, this.printableComponentLink2, this.printableComponentLink3, this.printableComponentLink4}); // // printableComponentLink1 // this.printableComponentLink1.Component = this.CurrentGridIncomeAnalysis; this.printableComponentLink1.CustomPaperSize = new System.Drawing.Size(0, 0); this.printableComponentLink1.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("printableComponentLink1.ImageStream"))); this.printableComponentLink1.Landscape = true; this.printableComponentLink1.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); this.printableComponentLink1.PageHeaderFooter = new DevExpress.XtraPrinting.PageHeaderFooter(new DevExpress.XtraPrinting.PageHeaderArea(new string[] { "\r\nCurrent Month Sales Report", "Income Analysis Report", "[Date Printed][Time Printed]"}, new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))), DevExpress.XtraPrinting.BrickAlignment.Near), new DevExpress.XtraPrinting.PageFooterArea(new string[] { "", "", "[Page # of Pages #]"}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))), DevExpress.XtraPrinting.BrickAlignment.Near)); this.printableComponentLink1.PaperKind = System.Drawing.Printing.PaperKind.A4; this.printableComponentLink1.PrintingSystem = this.printingSystem1; this.printableComponentLink1.VerticalContentSplitting = DevExpress.XtraPrinting.VerticalContentSplitting.Smart; // // printableComponentLink2 // this.printableComponentLink2.CustomPaperSize = new System.Drawing.Size(0, 0); this.printableComponentLink2.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("printableComponentLink2.ImageStream"))); this.printableComponentLink2.Landscape = true; this.printableComponentLink2.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); this.printableComponentLink2.PageHeaderFooter = new DevExpress.XtraPrinting.PageHeaderFooter(new DevExpress.XtraPrinting.PageHeaderArea(new string[] { "Previus Two Month Sales Report", "", "[Date Printed][Time Printed]"}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))), DevExpress.XtraPrinting.BrickAlignment.Near), new DevExpress.XtraPrinting.PageFooterArea(new string[] { "", "", "[Page # of Pages #]"}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))), DevExpress.XtraPrinting.BrickAlignment.Near)); this.printableComponentLink2.PaperKind = System.Drawing.Printing.PaperKind.A4; this.printableComponentLink2.PrintingSystem = this.printingSystem1; this.printableComponentLink2.VerticalContentSplitting = DevExpress.XtraPrinting.VerticalContentSplitting.Smart; // // printableComponentLink3 // this.printableComponentLink3.CustomPaperSize = new System.Drawing.Size(0, 0); this.printableComponentLink3.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("printableComponentLink3.ImageStream"))); this.printableComponentLink3.Landscape = true; this.printableComponentLink3.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); this.printableComponentLink3.PageHeaderFooter = new DevExpress.XtraPrinting.PageHeaderFooter(new DevExpress.XtraPrinting.PageHeaderArea(new string[] { "Previous 10 Days Sales Report", "", "[Date Printed][Time Printed]"}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))), DevExpress.XtraPrinting.BrickAlignment.Near), new DevExpress.XtraPrinting.PageFooterArea(new string[] { "", "", "[Page # of Pages #]"}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))), DevExpress.XtraPrinting.BrickAlignment.Near)); this.printableComponentLink3.PaperKind = System.Drawing.Printing.PaperKind.A4; this.printableComponentLink3.PrintingSystem = this.printingSystem1; this.printableComponentLink3.VerticalContentSplitting = DevExpress.XtraPrinting.VerticalContentSplitting.Smart; // // printableComponentLink4 // this.printableComponentLink4.CustomPaperSize = new System.Drawing.Size(0, 0); this.printableComponentLink4.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("printableComponentLink4.ImageStream"))); this.printableComponentLink4.Landscape = true; this.printableComponentLink4.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); this.printableComponentLink4.PageHeaderFooter = new DevExpress.XtraPrinting.PageHeaderFooter(new DevExpress.XtraPrinting.PageHeaderArea(new string[] { "Previous 10 Days Sales Report", "", "[Date Printed][Time Printed]"}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))), DevExpress.XtraPrinting.BrickAlignment.Near), new DevExpress.XtraPrinting.PageFooterArea(new string[] { "", "", "[Page # of Pages #]"}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))), DevExpress.XtraPrinting.BrickAlignment.Near)); this.printableComponentLink4.PaperKind = System.Drawing.Printing.PaperKind.A4; this.printableComponentLink4.PrintingSystem = this.printingSystem1; this.printableComponentLink4.VerticalContentSplitting = DevExpress.XtraPrinting.VerticalContentSplitting.Smart; // // hyperLinkEdit1 // this.hyperLinkEdit1.EditValue = "PRINT"; this.hyperLinkEdit1.Location = new System.Drawing.Point(120, 253); this.hyperLinkEdit1.Name = "hyperLinkEdit1"; this.hyperLinkEdit1.Properties.Appearance.BackColor = System.Drawing.SystemColors.Control; this.hyperLinkEdit1.Properties.Appearance.Options.UseBackColor = true; this.hyperLinkEdit1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; this.hyperLinkEdit1.Size = new System.Drawing.Size(40, 18); this.hyperLinkEdit1.TabIndex = 140; this.hyperLinkEdit1.OpenLink += new DevExpress.XtraEditors.Controls.OpenLinkEventHandler(this.hyperLinkEdit1_OpenLink); // // PrevGridIncomeAnalysis // this.PrevGridIncomeAnalysis.AppearancePrint.Cell.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.Cell.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.CustomTotalCell.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.CustomTotalCell.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.FieldValue.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.FieldValue.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.FieldValueGrandTotal.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.FieldValueGrandTotal.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.FieldValueTotal.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.FieldValueTotal.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.FilterSeparator.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.FilterSeparator.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.GrandTotalCell.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.GrandTotalCell.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.Lines.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.Lines.Options.UseFont = true; this.PrevGridIncomeAnalysis.AppearancePrint.TotalCell.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PrevGridIncomeAnalysis.AppearancePrint.TotalCell.Options.UseFont = true; this.PrevGridIncomeAnalysis.Cursor = System.Windows.Forms.Cursors.Default; this.PrevGridIncomeAnalysis.Fields.AddRange(new DevExpress.XtraPivotGrid.PivotGridField[] { this.pivotGridField1, this.pivotGridField3, this.pivotGridField4, this.vTargetAmt, this.TargetAmt, this.pivotGridField13, this.TestTargetAmt}); this.PrevGridIncomeAnalysis.Groups.AddRange(new DevExpress.XtraPivotGrid.PivotGridGroup[] { pivotGridGroup2}); this.PrevGridIncomeAnalysis.Location = new System.Drawing.Point(-8, 450); this.PrevGridIncomeAnalysis.Name = "PrevGridIncomeAnalysis"; this.PrevGridIncomeAnalysis.OptionsBehavior.ApplyBestFitOnFieldDragging = true; this.PrevGridIncomeAnalysis.OptionsCustomization.AllowDrag = false; this.PrevGridIncomeAnalysis.OptionsCustomization.AllowExpand = false; this.PrevGridIncomeAnalysis.OptionsCustomization.AllowHideFields = DevExpress.XtraPivotGrid.AllowHideFieldsType.Never; this.PrevGridIncomeAnalysis.OptionsCustomization.AllowSort = false; this.PrevGridIncomeAnalysis.OptionsDataField.Area = DevExpress.XtraPivotGrid.PivotDataArea.RowArea; this.PrevGridIncomeAnalysis.OptionsDataField.AreaIndex = 1; this.PrevGridIncomeAnalysis.OptionsPrint.PrintDataHeaders = DevExpress.Utils.DefaultBoolean.False; this.PrevGridIncomeAnalysis.OptionsPrint.PrintFilterHeaders = DevExpress.Utils.DefaultBoolean.False; this.PrevGridIncomeAnalysis.OptionsPrint.UsePrintAppearance = true; this.PrevGridIncomeAnalysis.OptionsView.ShowDataHeaders = false; this.PrevGridIncomeAnalysis.OptionsView.ShowFilterHeaders = false; this.PrevGridIncomeAnalysis.OptionsView.ShowFilterSeparatorBar = false; this.PrevGridIncomeAnalysis.OptionsView.ShowRowGrandTotals = false; this.PrevGridIncomeAnalysis.Size = new System.Drawing.Size(960, 176); this.PrevGridIncomeAnalysis.TabIndex = 142; // // pivotGridField1 // this.pivotGridField1.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.pivotGridField1.AreaIndex = 0; this.pivotGridField1.Caption = "Branch Sales"; this.pivotGridField1.ExpandedInFieldsGroup = false; this.pivotGridField1.FieldName = "mNettAmount"; this.pivotGridField1.MinWidth = 80; this.pivotGridField1.Name = "pivotGridField1"; this.pivotGridField1.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField1.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.True; this.pivotGridField1.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField1.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField1.TotalCellFormat.FormatString = "f2"; this.pivotGridField1.TotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pivotGridField1.TotalValueFormat.FormatString = "f2"; this.pivotGridField1.TotalValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pivotGridField1.ValueFormat.FormatString = "f2"; this.pivotGridField1.ValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pivotGridField1.Width = 80; // // pivotGridField3 // this.pivotGridField3.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.pivotGridField3.AreaIndex = 0; this.pivotGridField3.Caption = "Branch"; this.pivotGridField3.FieldName = "strBranchCode"; this.pivotGridField3.MinWidth = 10; this.pivotGridField3.Name = "pivotGridField3"; this.pivotGridField3.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField3.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.True; this.pivotGridField3.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField3.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField3.Width = 80; // // pivotGridField4 // this.pivotGridField4.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.pivotGridField4.AreaIndex = 1; this.pivotGridField4.FieldName = "mTotalAmount"; this.pivotGridField4.Name = "pivotGridField4"; this.pivotGridField4.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField4.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField4.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField4.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField4.TotalCellFormat.FormatString = "f2"; this.pivotGridField4.TotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pivotGridField4.TotalValueFormat.FormatString = "f2"; this.pivotGridField4.TotalValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pivotGridField4.ValueFormat.FormatString = "f2"; this.pivotGridField4.ValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.pivotGridField4.Visible = false; this.pivotGridField4.Width = 80; // // vTargetAmt // this.vTargetAmt.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.vTargetAmt.AreaIndex = 1; this.vTargetAmt.Caption = "Target Amount"; this.vTargetAmt.Name = "vTargetAmt"; this.vTargetAmt.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.vTargetAmt.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.False; this.vTargetAmt.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.vTargetAmt.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.vTargetAmt.SummaryType = DevExpress.Data.PivotGrid.PivotSummaryType.Custom; this.vTargetAmt.TotalCellFormat.FormatString = "f2"; this.vTargetAmt.TotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.vTargetAmt.TotalValueFormat.FormatString = "f2"; this.vTargetAmt.TotalValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.vTargetAmt.UnboundFieldName = "gvTargetAmt"; this.vTargetAmt.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; this.vTargetAmt.ValueFormat.FormatString = "f2"; this.vTargetAmt.ValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; // // TargetAmt // this.TargetAmt.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.TargetAmt.AreaIndex = 2; this.TargetAmt.Caption = "Amount > Target"; this.TargetAmt.Name = "TargetAmt"; this.TargetAmt.SummaryType = DevExpress.Data.PivotGrid.PivotSummaryType.Custom; this.TargetAmt.TotalValueFormat.FormatString = "f2"; this.TargetAmt.TotalValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.TargetAmt.UnboundFieldName = "TargetAmount"; this.TargetAmt.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; this.TargetAmt.ValueFormat.FormatString = "f2"; this.TargetAmt.ValueFormat.FormatType = DevExpress.Utils.FormatType.Numeric; this.TargetAmt.Width = 90; // // pivotGridField13 // this.pivotGridField13.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.pivotGridField13.AreaIndex = 0; this.pivotGridField13.Caption = "Month"; this.pivotGridField13.FieldName = "dtMonth"; this.pivotGridField13.Name = "pivotGridField13"; this.pivotGridField13.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField13.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField13.Width = 80; // // TestTargetAmt // this.TestTargetAmt.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.TestTargetAmt.AreaIndex = 1; this.TestTargetAmt.FieldName = "TargetAmount"; this.TestTargetAmt.Name = "TestTargetAmt"; this.TestTargetAmt.Visible = false; this.TestTargetAmt.Width = 90; // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Location = new System.Drawing.Point(-1, 8); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(136, 16); this.label3.TabIndex = 143; this.label3.Text = "Previous 10 Days Sales"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Location = new System.Drawing.Point(0, 432); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(96, 16); this.label1.TabIndex = 144; this.label1.Text = "Selected Month:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label1.Click += new System.EventHandler(this.label1_Click); // // hyperLinkEdit2 // this.hyperLinkEdit2.EditValue = "PRINT"; this.hyperLinkEdit2.Location = new System.Drawing.Point(199, 8); this.hyperLinkEdit2.Name = "hyperLinkEdit2"; this.hyperLinkEdit2.Properties.Appearance.BackColor = System.Drawing.SystemColors.Control; this.hyperLinkEdit2.Properties.Appearance.Options.UseBackColor = true; this.hyperLinkEdit2.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; this.hyperLinkEdit2.Size = new System.Drawing.Size(40, 18); this.hyperLinkEdit2.TabIndex = 147; // // btn_Add // this.btn_Add.Appearance.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_Add.Appearance.Options.UseFont = true; this.btn_Add.Appearance.Options.UseTextOptions = true; this.btn_Add.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; this.btn_Add.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top; this.btn_Add.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap; this.btn_Add.ImageIndex = 0; this.btn_Add.ImageList = this.imageList1; this.btn_Add.ImeMode = System.Windows.Forms.ImeMode.On; this.btn_Add.Location = new System.Drawing.Point(135, 8); this.btn_Add.Name = "btn_Add"; this.btn_Add.Size = new System.Drawing.Size(32, 16); this.btn_Add.TabIndex = 146; this.btn_Add.Click += new System.EventHandler(this.btn_Add_Click); // // btn_Del // this.btn_Del.Appearance.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_Del.Appearance.Options.UseFont = true; this.btn_Del.Appearance.Options.UseTextOptions = true; this.btn_Del.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; this.btn_Del.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top; this.btn_Del.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap; this.btn_Del.ImageIndex = 1; this.btn_Del.ImageList = this.imageList1; this.btn_Del.Location = new System.Drawing.Point(168, 8); this.btn_Del.Name = "btn_Del"; this.btn_Del.Size = new System.Drawing.Size(24, 16); this.btn_Del.TabIndex = 145; this.btn_Del.Click += new System.EventHandler(this.btn_Del_Click); // // pvGrandTotal10Days // this.pvGrandTotal10Days.Cursor = System.Windows.Forms.Cursors.Default; this.pvGrandTotal10Days.Fields.AddRange(new DevExpress.XtraPivotGrid.PivotGridField[] { this.pivotGridField16, this.pivotGridField17}); this.pvGrandTotal10Days.Groups.AddRange(new DevExpress.XtraPivotGrid.PivotGridGroup[] { pivotGridGroup3}); this.pvGrandTotal10Days.Location = new System.Drawing.Point(0, 32); this.pvGrandTotal10Days.Name = "pvGrandTotal10Days"; this.pvGrandTotal10Days.OptionsCustomization.AllowDrag = false; this.pvGrandTotal10Days.OptionsCustomization.AllowExpand = false; this.pvGrandTotal10Days.OptionsCustomization.AllowSort = false; this.pvGrandTotal10Days.OptionsDataField.Area = DevExpress.XtraPivotGrid.PivotDataArea.RowArea; this.pvGrandTotal10Days.OptionsDataField.AreaIndex = 1; this.pvGrandTotal10Days.OptionsView.ShowDataHeaders = false; this.pvGrandTotal10Days.OptionsView.ShowFilterHeaders = false; this.pvGrandTotal10Days.OptionsView.ShowRowGrandTotals = false; this.pvGrandTotal10Days.Size = new System.Drawing.Size(960, 200); this.pvGrandTotal10Days.TabIndex = 150; // // pivotGridField16 // this.pivotGridField16.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.pivotGridField16.AreaIndex = 0; this.pivotGridField16.Caption = "Nett Amount"; this.pivotGridField16.FieldName = "mNettAmount"; this.pivotGridField16.Name = "pivotGridField16"; // // pivotGridField17 // this.pivotGridField17.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.pivotGridField17.AreaIndex = 0; this.pivotGridField17.Caption = "Branch"; this.pivotGridField17.FieldName = "strBranchCode"; this.pivotGridField17.Name = "pivotGridField17"; this.pivotGridField17.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField17.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField17.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField17.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; // // ThirdGridIncomeAnalysis // this.ThirdGridIncomeAnalysis.Cursor = System.Windows.Forms.Cursors.Default; this.ThirdGridIncomeAnalysis.Fields.AddRange(new DevExpress.XtraPivotGrid.PivotGridField[] { this.pivotGridField11, this.pivotGridField12, this.pivotGridField9}); this.ThirdGridIncomeAnalysis.Groups.AddRange(new DevExpress.XtraPivotGrid.PivotGridGroup[] { pivotGridGroup4}); this.ThirdGridIncomeAnalysis.Location = new System.Drawing.Point(0, 27); this.ThirdGridIncomeAnalysis.Name = "ThirdGridIncomeAnalysis"; this.ThirdGridIncomeAnalysis.OptionsCustomization.AllowDrag = false; this.ThirdGridIncomeAnalysis.OptionsCustomization.AllowExpand = false; this.ThirdGridIncomeAnalysis.OptionsCustomization.AllowSort = false; this.ThirdGridIncomeAnalysis.OptionsDataField.Area = DevExpress.XtraPivotGrid.PivotDataArea.RowArea; this.ThirdGridIncomeAnalysis.OptionsDataField.AreaIndex = 1; this.ThirdGridIncomeAnalysis.OptionsView.ShowDataHeaders = false; this.ThirdGridIncomeAnalysis.OptionsView.ShowFilterHeaders = false; this.ThirdGridIncomeAnalysis.OptionsView.ShowRowGrandTotals = false; this.ThirdGridIncomeAnalysis.Size = new System.Drawing.Size(960, 224); this.ThirdGridIncomeAnalysis.TabIndex = 151; // // pivotGridField11 // this.pivotGridField11.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.pivotGridField11.AreaIndex = 0; this.pivotGridField11.Caption = "Nett Amount"; this.pivotGridField11.FieldName = "mNettAmount"; this.pivotGridField11.Name = "pivotGridField11"; this.pivotGridField11.Width = 90; // // pivotGridField12 // this.pivotGridField12.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.pivotGridField12.AreaIndex = 0; this.pivotGridField12.Caption = "Branch"; this.pivotGridField12.FieldName = "strBranchCode"; this.pivotGridField12.Name = "pivotGridField12"; this.pivotGridField12.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField12.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField12.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField12.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField12.Width = 90; // // pivotGridField9 // this.pivotGridField9.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.pivotGridField9.AreaIndex = 0; this.pivotGridField9.Caption = "Date"; this.pivotGridField9.FieldName = "dtDate"; this.pivotGridField9.Name = "pivotGridField9"; this.pivotGridField9.Options.AllowDrag = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField9.Options.AllowExpand = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField9.Options.AllowFilter = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField9.Options.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.pivotGridField9.ValueFormat.FormatString = "d"; this.pivotGridField9.ValueFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.pivotGridField9.Width = 80; // // cmbMonth // this.cmbMonth.Items.AddRange(new object[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}); this.cmbMonth.Location = new System.Drawing.Point(440, 5); this.cmbMonth.Name = "cmbMonth"; this.cmbMonth.Size = new System.Drawing.Size(104, 21); this.cmbMonth.TabIndex = 152; this.cmbMonth.Text = "-Select Month-"; this.cmbMonth.SelectedIndexChanged += new System.EventHandler(this.cmbMonth_SelectedIndexChanged); // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.Location = new System.Drawing.Point(392, 10); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(40, 16); this.label4.TabIndex = 153; this.label4.Text = "Month"; // // RPIncomeAnalysis // this.AutoScroll = true; this.ClientSize = new System.Drawing.Size(994, 688); this.Controls.Add(this.label4); this.Controls.Add(this.cmbMonth); this.Controls.Add(this.hyperLinkEdit2); this.Controls.Add(this.btn_Add); this.Controls.Add(this.btn_Del); this.Controls.Add(this.label1); this.Controls.Add(this.label3); this.Controls.Add(this.PrevGridIncomeAnalysis); this.Controls.Add(this.hyperLinkEdit1); this.Controls.Add(this.PRINT1); this.Controls.Add(this.label2); this.Controls.Add(this.label63); this.Controls.Add(this.cmbCategory); this.Controls.Add(this.CurrentGridIncomeAnalysis); this.Controls.Add(this.ThirdGridIncomeAnalysis); this.Controls.Add(this.pvGrandTotal10Days); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "RPIncomeAnalysis"; this.Padding = new System.Windows.Forms.Padding(0, 0, 0, 50); this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Income Analysis Report"; this.TopMost = true; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.ShowReport_Load); ((System.ComponentModel.ISupportInitialize)(this.CurrentGridIncomeAnalysis)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cmbCategory.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PRINT1.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.hyperLinkEdit1.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PrevGridIncomeAnalysis)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.hyperLinkEdit2.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pvGrandTotal10Days)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ThirdGridIncomeAnalysis)).EndInit(); this.ResumeLayout(false); }
private void m_cmd_xuat_pdf_Click(object sender, EventArgs e) { try { DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); CompositeLink cl = new CompositeLink(ps); PrintableComponentLink pclChart = new PrintableComponentLink(); PrintableComponentLink pclPivot = new PrintableComponentLink(); pclChart.Component = m_chart_gpa_cpa; pclPivot.Component = m_pivot_kq_sinh_vien; cl.Links.AddRange(new object[] { pclChart, pclPivot }); cl.ShowPreviewDialog(); cl.PrintingSystem.ExportToPdf(Application.StartupPath + "\\..\\..\\CPA_GPA.pdf"); } catch (Exception v) { MessageBox.Show("Đã xảy ra lỗi hệ thống!"); } }
private void m_cmd_xuat_pdf_Click(object sender, EventArgs e) { try { DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); CompositeLink cl = new CompositeLink(ps); PrintableComponentLink pclChart = new PrintableComponentLink(); PrintableComponentLink pclPivot = new PrintableComponentLink(); pclChart.Component = chartControl1; pclPivot.Component = m_pivot_ty_le_qua_mon; cl.Links.AddRange(new object[] { pclChart, pclPivot }); cl.ShowPreviewDialog(); cl.PrintingSystem.ExportToPdf(Application.StartupPath + "\\..\\..\\BaoCao.pdf"); } catch { MessageBox.Show("Đã xảy ra lỗi hệ thống!"); } }
/// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1)); this.button1 = new System.Windows.Forms.Button(); this.printPreviewDialog2 = new System.Windows.Forms.PrintPreviewDialog(); this.printingSystem1 = new DevExpress.XtraPrinting.PrintingSystem(this.components); this.link1 = new DevExpress.XtraPrinting.Link(this.components); this.printPreviewBar1 = new DevExpress.XtraPrinting.Preview.PrintPreviewBar(); this.printPreviewBarButton1 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton2 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton3 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton1 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton4 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton5 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton6 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton7 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton8 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton2 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton9 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton10 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton11 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton12 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton3 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton13 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton14 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton15 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton16 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton4 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton17 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton18 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton19 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton5 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton20 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton21 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton6 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton22 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printControl1 = new DevExpress.XtraPrinting.Control.PrintControl(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.helpProvider1 = new System.Windows.Forms.HelpProvider(); this.textBox1 = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).BeginInit(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(120, 72); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(64, 32); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.Click += new System.EventHandler(this.button1_Click); // // printPreviewDialog2 // this.printPreviewDialog2.AutoScrollMargin = new System.Drawing.Size(0, 0); this.printPreviewDialog2.AutoScrollMinSize = new System.Drawing.Size(0, 0); this.printPreviewDialog2.ClientSize = new System.Drawing.Size(400, 300); this.printPreviewDialog2.Enabled = true; this.printPreviewDialog2.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog2.Icon"))); this.printPreviewDialog2.Location = new System.Drawing.Point(47, 14); this.printPreviewDialog2.MinimumSize = new System.Drawing.Size(375, 250); this.printPreviewDialog2.Name = "printPreviewDialog2"; this.printPreviewDialog2.TransparencyKey = System.Drawing.Color.Empty; this.printPreviewDialog2.Visible = false; // // printingSystem1 // this.printingSystem1.Links.AddRange(new object[] { this.link1}); // // link1 // this.link1.PrintingSystem = this.printingSystem1; // // printPreviewBar1 // this.printPreviewBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat; this.printPreviewBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] { this.printPreviewBarButton1, this.printPreviewBarButton2, this.printPreviewBarButton3, this.toolBarButton1, this.printPreviewBarButton4, this.printPreviewBarButton5, this.printPreviewBarButton6, this.printPreviewBarButton7, this.printPreviewBarButton8, this.toolBarButton2, this.printPreviewBarButton9, this.printPreviewBarButton10, this.printPreviewBarButton11, this.printPreviewBarButton12, this.toolBarButton3, this.printPreviewBarButton13, this.printPreviewBarButton14, this.printPreviewBarButton15, this.printPreviewBarButton16, this.toolBarButton4, this.printPreviewBarButton17, this.printPreviewBarButton18, this.printPreviewBarButton19, this.toolBarButton5, this.printPreviewBarButton20, this.printPreviewBarButton21, this.toolBarButton6, this.printPreviewBarButton22}); this.printPreviewBar1.ButtonSize = new System.Drawing.Size(16, 16); this.printPreviewBar1.DropDownArrows = true; this.printPreviewBar1.Location = new System.Drawing.Point(0, 0); this.printPreviewBar1.Name = "printPreviewBar1"; this.printPreviewBar1.PrintControl = this.printControl1; this.printPreviewBar1.ShowToolTips = true; this.printPreviewBar1.Size = new System.Drawing.Size(560, 72); this.printPreviewBar1.TabIndex = 1; // // printPreviewBarButton1 // this.printPreviewBarButton1.Command = DevExpress.XtraPrinting.PrintingSystemCommand.DocumentMap; this.printPreviewBarButton1.Enabled = false; this.printPreviewBarButton1.ImageIndex = 19; this.printPreviewBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton1.ToolTipText = "Document Map"; // // printPreviewBarButton2 // this.printPreviewBarButton2.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Find; this.printPreviewBarButton2.Enabled = false; this.printPreviewBarButton2.ImageIndex = 20; this.printPreviewBarButton2.ToolTipText = "Search"; // // printPreviewBarButton3 // this.printPreviewBarButton3.Command = DevExpress.XtraPrinting.PrintingSystemCommand.HandTool; this.printPreviewBarButton3.Enabled = false; this.printPreviewBarButton3.ImageIndex = 16; this.printPreviewBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton3.ToolTipText = "Hand Tool"; // // toolBarButton1 // this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton4 // this.printPreviewBarButton4.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Customize; this.printPreviewBarButton4.Enabled = false; this.printPreviewBarButton4.ImageIndex = 14; this.printPreviewBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton4.ToolTipText = "Customize"; // // printPreviewBarButton5 // this.printPreviewBarButton5.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Print; this.printPreviewBarButton5.Enabled = false; this.printPreviewBarButton5.ImageIndex = 0; this.printPreviewBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton5.ToolTipText = "Print"; // // printPreviewBarButton6 // this.printPreviewBarButton6.Command = DevExpress.XtraPrinting.PrintingSystemCommand.PrintDirect; this.printPreviewBarButton6.Enabled = false; this.printPreviewBarButton6.ImageIndex = 1; this.printPreviewBarButton6.ToolTipText = "Print Direct"; // // printPreviewBarButton7 // this.printPreviewBarButton7.Command = DevExpress.XtraPrinting.PrintingSystemCommand.PageSetup; this.printPreviewBarButton7.Enabled = false; this.printPreviewBarButton7.ImageIndex = 2; this.printPreviewBarButton7.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton7.ToolTipText = "Page Setup"; // // printPreviewBarButton8 // this.printPreviewBarButton8.Command = DevExpress.XtraPrinting.PrintingSystemCommand.EditPageHF; this.printPreviewBarButton8.Enabled = false; this.printPreviewBarButton8.ImageIndex = 15; this.printPreviewBarButton8.ToolTipText = "Header And Footer"; // // toolBarButton2 // this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton9 // this.printPreviewBarButton9.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Magnifier; this.printPreviewBarButton9.Enabled = false; this.printPreviewBarButton9.ImageIndex = 3; this.printPreviewBarButton9.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton9.ToolTipText = "Magnifier"; // // printPreviewBarButton10 // this.printPreviewBarButton10.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ZoomIn; this.printPreviewBarButton10.Enabled = false; this.printPreviewBarButton10.ImageIndex = 4; this.printPreviewBarButton10.ToolTipText = "缩小"; // // printPreviewBarButton11 // this.printPreviewBarButton11.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ZoomOut; this.printPreviewBarButton11.Enabled = false; this.printPreviewBarButton11.ImageIndex = 5; this.printPreviewBarButton11.ToolTipText = "Zoom Out"; // // printPreviewBarButton12 // this.printPreviewBarButton12.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Zoom; this.printPreviewBarButton12.Enabled = false; this.printPreviewBarButton12.ImageIndex = 6; this.printPreviewBarButton12.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; this.printPreviewBarButton12.ToolTipText = "Zoom"; // // toolBarButton3 // this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton13 // this.printPreviewBarButton13.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowFirstPage; this.printPreviewBarButton13.Enabled = false; this.printPreviewBarButton13.ImageIndex = 7; this.printPreviewBarButton13.ToolTipText = "First Page"; // // printPreviewBarButton14 // this.printPreviewBarButton14.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowPrevPage; this.printPreviewBarButton14.Enabled = false; this.printPreviewBarButton14.ImageIndex = 8; this.printPreviewBarButton14.ToolTipText = "Previous Page"; // // printPreviewBarButton15 // this.printPreviewBarButton15.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowNextPage; this.printPreviewBarButton15.Enabled = false; this.printPreviewBarButton15.ImageIndex = 9; this.printPreviewBarButton15.ToolTipText = "Next Page"; // // printPreviewBarButton16 // this.printPreviewBarButton16.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowLastPage; this.printPreviewBarButton16.Enabled = false; this.printPreviewBarButton16.ImageIndex = 10; this.printPreviewBarButton16.ToolTipText = "Last Page"; // // toolBarButton4 // this.toolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton17 // this.printPreviewBarButton17.Command = DevExpress.XtraPrinting.PrintingSystemCommand.MultiplePages; this.printPreviewBarButton17.Enabled = false; this.printPreviewBarButton17.ImageIndex = 11; this.printPreviewBarButton17.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton17.ToolTipText = "Multiple Pages"; // // printPreviewBarButton18 // this.printPreviewBarButton18.Command = DevExpress.XtraPrinting.PrintingSystemCommand.FillBackground; this.printPreviewBarButton18.Enabled = false; this.printPreviewBarButton18.ImageIndex = 12; this.printPreviewBarButton18.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton18.ToolTipText = "Background"; // // printPreviewBarButton19 // this.printPreviewBarButton19.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Watermark; this.printPreviewBarButton19.Enabled = false; this.printPreviewBarButton19.ImageIndex = 21; this.printPreviewBarButton19.ToolTipText = "Watermark"; // // toolBarButton5 // this.toolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton20 // this.printPreviewBarButton20.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ExportFile; this.printPreviewBarButton20.Enabled = false; this.printPreviewBarButton20.ImageIndex = 18; this.printPreviewBarButton20.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; this.printPreviewBarButton20.ToolTipText = "Export Document..."; // // printPreviewBarButton21 // this.printPreviewBarButton21.Command = DevExpress.XtraPrinting.PrintingSystemCommand.SendFile; this.printPreviewBarButton21.Enabled = false; this.printPreviewBarButton21.ImageIndex = 17; this.printPreviewBarButton21.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; this.printPreviewBarButton21.ToolTipText = "Send e-mail..."; // // toolBarButton6 // this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton22 // this.printPreviewBarButton22.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ClosePreview; this.printPreviewBarButton22.Enabled = false; this.printPreviewBarButton22.ImageIndex = 13; this.printPreviewBarButton22.ToolTipText = "Close Preview"; // // printControl1 // this.printControl1.IsMetric = true; this.printControl1.Location = new System.Drawing.Point(48, 112); this.printControl1.Name = "printControl1"; this.printControl1.PrintingSystem = this.printingSystem1; this.printControl1.Size = new System.Drawing.Size(488, 344); this.printControl1.TabIndex = 2; this.printControl1.TabStop = false; this.printControl1.Text = "printControl1"; // // groupBox1 // this.groupBox1.Location = new System.Drawing.Point(256, 48); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(160, 56); this.groupBox1.TabIndex = 3; this.groupBox1.TabStop = false; this.groupBox1.Text = "groupBox1"; // // helpProvider1 // this.helpProvider1.HelpNamespace = "G:\\ReleaseFile\\(8-10)ReleaseWithoutCheckCard\\创智智能晨检网络管理系统联机丛书.chm"; // // textBox1 // this.helpProvider1.SetHelpKeyword(this.textBox1, "硬件"); this.helpProvider1.SetHelpNavigator(this.textBox1, System.Windows.Forms.HelpNavigator.KeywordIndex); this.helpProvider1.SetHelpString(this.textBox1, ""); this.textBox1.Location = new System.Drawing.Point(440, 80); this.textBox1.Name = "textBox1"; this.helpProvider1.SetShowHelp(this.textBox1, true); this.textBox1.TabIndex = 4; this.textBox1.Text = "textBox1"; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(560, 445); this.Controls.Add(this.textBox1); this.Controls.Add(this.groupBox1); this.Controls.Add(this.printControl1); this.Controls.Add(this.printPreviewBar1); this.Controls.Add(this.button1); this.helpProvider1.SetHelpString(this, ""); this.Name = "Form1"; this.helpProvider1.SetShowHelp(this, false); this.Text = "Form1"; this.Load += new System.EventHandler(this.Form1_Load); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// 定义一个protected 的构造函数以阻止外部直接创建。 /// </summary> /// <summary> /// 构造函数... /// </summary> protected XPrint() { _PS = new DevExpress.XtraPrinting.PrintingSystem(); _PrintableLink = new DevExpress.XtraPrinting.PrintableComponentLink(_PS); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.btnPrint = new DevExpress.XtraEditors.SimpleButton(); this.dtDateDay = new System.Windows.Forms.MonthCalendar(); this.dtClickDateTill = new System.Windows.Forms.MonthCalendar(); this.dtClickDate = new System.Windows.Forms.MonthCalendar(); this.label3 = new System.Windows.Forms.Label(); this.btn_View = new DevExpress.XtraEditors.SimpleButton(); this.dtClickDateTill2 = new DevExpress.XtraEditors.DateEdit(); this.dtClickDate1 = new DevExpress.XtraEditors.DateEdit(); this.btnExport = new DevExpress.XtraEditors.SimpleButton(); this.gridMaster = new DevExpress.XtraGrid.GridControl(); this.gridMasterView = new DevExpress.XtraGrid.Views.Grid.GridView(); this.nCategory = new DevExpress.XtraGrid.Columns.GridColumn(); this.lk_Category = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); this.printingSystem1 = new DevExpress.XtraPrinting.PrintingSystem(this.components); this.printableComponentLink1 = new DevExpress.XtraPrinting.PrintableComponentLink(this.components); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dtClickDateTill2.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dtClickDate1.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMaster)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMasterView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lk_Category)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).BeginInit(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.btnPrint); this.groupBox1.Controls.Add(this.dtDateDay); this.groupBox1.Controls.Add(this.dtClickDateTill); this.groupBox1.Controls.Add(this.dtClickDate); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.btn_View); this.groupBox1.Controls.Add(this.dtClickDateTill2); this.groupBox1.Controls.Add(this.dtClickDate1); this.groupBox1.Controls.Add(this.btnExport); this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(768, 160); this.groupBox1.TabIndex = 6; this.groupBox1.TabStop = false; this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter); // // btnPrint // this.btnPrint.Location = new System.Drawing.Point(648, 72); this.btnPrint.Name = "btnPrint"; this.btnPrint.Size = new System.Drawing.Size(96, 23); this.btnPrint.TabIndex = 11; this.btnPrint.Text = "Print"; this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click); // // dtDateDay // this.dtDateDay.Location = new System.Drawing.Point(448, 8); this.dtDateDay.Name = "dtDateDay"; this.dtDateDay.TabIndex = 10; this.dtDateDay.DateSelected += new System.Windows.Forms.DateRangeEventHandler(this.dtDateDay_DateSelected); // // dtClickDateTill // this.dtClickDateTill.Location = new System.Drawing.Point(248, 8); this.dtClickDateTill.Name = "dtClickDateTill"; this.dtClickDateTill.TabIndex = 9; // // dtClickDate // this.dtClickDate.Location = new System.Drawing.Point(8, 8); this.dtClickDate.Name = "dtClickDate"; this.dtClickDate.TabIndex = 8; // // label3 // this.label3.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label3.Location = new System.Drawing.Point(206, 64); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(36, 22); this.label3.TabIndex = 7; this.label3.Text = "TO"; // // btn_View // this.btn_View.Location = new System.Drawing.Point(206, 112); this.btn_View.Name = "btn_View"; this.btn_View.Size = new System.Drawing.Size(32, 23); this.btn_View.TabIndex = 6; this.btn_View.Text = "View"; this.btn_View.Click += new System.EventHandler(this.btn_View_Click); // // dtClickDateTill2 // this.dtClickDateTill2.Anchor = System.Windows.Forms.AnchorStyles.None; this.dtClickDateTill2.EditValue = null; this.dtClickDateTill2.Location = new System.Drawing.Point(280, 66); this.dtClickDateTill2.Name = "dtClickDateTill2"; // // dtClickDateTill2.Properties // this.dtClickDateTill2.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D; this.dtClickDateTill2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.dtClickDateTill2.Properties.DisplayFormat.FormatString = "dd/MM/yyyy"; this.dtClickDateTill2.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDateTill2.Properties.EditFormat.FormatString = "dd/MM/yyyy"; this.dtClickDateTill2.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDateTill2.Properties.Mask.EditMask = "dd/MM/yyyy"; this.dtClickDateTill2.Size = new System.Drawing.Size(108, 22); this.dtClickDateTill2.TabIndex = 4; // // dtClickDate1 // this.dtClickDate1.Anchor = System.Windows.Forms.AnchorStyles.None; this.dtClickDate1.EditValue = null; this.dtClickDate1.Location = new System.Drawing.Point(48, 34); this.dtClickDate1.Name = "dtClickDate1"; // // dtClickDate1.Properties // this.dtClickDate1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D; this.dtClickDate1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.dtClickDate1.Properties.DisplayFormat.FormatString = "dd/MM/yyyy"; this.dtClickDate1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDate1.Properties.EditFormat.FormatString = "dd/MM/yyyy"; this.dtClickDate1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDate1.Properties.Mask.EditMask = "dd/MM/yyyy"; this.dtClickDate1.Size = new System.Drawing.Size(108, 22); this.dtClickDate1.TabIndex = 1; // // btnExport // this.btnExport.Location = new System.Drawing.Point(648, 32); this.btnExport.Name = "btnExport"; this.btnExport.Size = new System.Drawing.Size(96, 23); this.btnExport.TabIndex = 7; this.btnExport.Text = "Export To Excel"; this.btnExport.Visible = false; this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // gridMaster // // // gridMaster.EmbeddedNavigator // this.gridMaster.EmbeddedNavigator.Name = ""; this.gridMaster.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); gridLevelNode1.RelationName = "Level1"; this.gridMaster.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] { gridLevelNode1}); this.gridMaster.Location = new System.Drawing.Point(0, 168); this.gridMaster.MainView = this.gridMasterView; this.gridMaster.Name = "gridMaster"; this.gridMaster.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.lk_Category}); this.gridMaster.Size = new System.Drawing.Size(784, 352); this.gridMaster.TabIndex = 5; this.gridMaster.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridMasterView}); // // gridMasterView // this.gridMasterView.ActiveFilterEnabled = false; this.gridMasterView.Appearance.GroupPanel.BackColor = System.Drawing.Color.White; this.gridMasterView.Appearance.GroupPanel.BorderColor = System.Drawing.Color.White; this.gridMasterView.Appearance.GroupPanel.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold); this.gridMasterView.Appearance.GroupPanel.ForeColor = System.Drawing.Color.Black; this.gridMasterView.Appearance.GroupPanel.Options.UseBackColor = true; this.gridMasterView.Appearance.GroupPanel.Options.UseBorderColor = true; this.gridMasterView.Appearance.GroupPanel.Options.UseFont = true; this.gridMasterView.Appearance.GroupPanel.Options.UseForeColor = true; this.gridMasterView.Appearance.HeaderPanel.ForeColor = System.Drawing.Color.Black; this.gridMasterView.Appearance.HeaderPanel.Options.UseForeColor = true; this.gridMasterView.AppearancePrint.HeaderPanel.ForeColor = System.Drawing.Color.Black; this.gridMasterView.AppearancePrint.HeaderPanel.Options.UseForeColor = true; this.gridMasterView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D; this.gridMasterView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.nCategory}); this.gridMasterView.GridControl = this.gridMaster; this.gridMasterView.GroupPanelText = "hELLO"; this.gridMasterView.Name = "gridMasterView"; this.gridMasterView.OptionsBehavior.Editable = false; this.gridMasterView.OptionsCustomization.AllowFilter = false; this.gridMasterView.OptionsCustomization.AllowSort = false; this.gridMasterView.OptionsPrint.PrintGroupFooter = false; this.gridMasterView.OptionsPrint.UsePrintStyles = true; this.gridMasterView.OptionsView.ShowFilterPanel = false; this.gridMasterView.OptionsView.ShowFooter = true; // // nCategory // this.nCategory.Caption = "Category"; this.nCategory.FieldName = "strReportGroup"; this.nCategory.Name = "nCategory"; this.nCategory.Visible = true; this.nCategory.VisibleIndex = 0; this.nCategory.Width = 100; // // lk_Category // this.lk_Category.AutoHeight = false; this.lk_Category.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.lk_Category.Name = "lk_Category"; // // printingSystem1 // this.printingSystem1.Links.AddRange(new object[] { this.printableComponentLink1}); // // printableComponentLink1 // this.printableComponentLink1.Component = this.gridMaster; this.printableComponentLink1.Landscape = true; this.printableComponentLink1.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); this.printableComponentLink1.PaperKind = System.Drawing.Printing.PaperKind.A4; this.printableComponentLink1.PrintingSystem = this.printingSystem1; // // RPAllIncome // this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.ClientSize = new System.Drawing.Size(784, 512); this.Controls.Add(this.groupBox1); this.Controls.Add(this.gridMaster); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "RPAllIncome"; this.Text = "RPAllIncome"; this.Load += new System.EventHandler(this.RPAllIncome_Load); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dtClickDateTill2.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dtClickDate1.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMaster)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMasterView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lk_Category)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.btnPrint = new DevExpress.XtraEditors.SimpleButton(); this.dtDateDay = new System.Windows.Forms.MonthCalendar(); this.dtClickDateTill = new System.Windows.Forms.MonthCalendar(); this.dtClickDate = new System.Windows.Forms.MonthCalendar(); this.label3 = new System.Windows.Forms.Label(); this.btn_View = new DevExpress.XtraEditors.SimpleButton(); this.dtClickDateTill2 = new DevExpress.XtraEditors.DateEdit(); this.dtClickDate1 = new DevExpress.XtraEditors.DateEdit(); this.btnExport = new DevExpress.XtraEditors.SimpleButton(); this.gridMaster = new DevExpress.XtraGrid.GridControl(); this.gridMasterView = new DevExpress.XtraGrid.Views.Grid.GridView(); this.nCategory = new DevExpress.XtraGrid.Columns.GridColumn(); this.lk_Category = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); this.printingSystem1 = new DevExpress.XtraPrinting.PrintingSystem(this.components); this.printableComponentLink1 = new DevExpress.XtraPrinting.PrintableComponentLink(this.components); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dtClickDateTill2.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dtClickDate1.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMaster)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMasterView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lk_Category)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).BeginInit(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.btnPrint); this.groupBox1.Controls.Add(this.dtDateDay); this.groupBox1.Controls.Add(this.dtClickDateTill); this.groupBox1.Controls.Add(this.dtClickDate); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.btn_View); this.groupBox1.Controls.Add(this.dtClickDateTill2); this.groupBox1.Controls.Add(this.dtClickDate1); this.groupBox1.Controls.Add(this.btnExport); this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(768, 160); this.groupBox1.TabIndex = 6; this.groupBox1.TabStop = false; this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter); // // btnPrint // this.btnPrint.Location = new System.Drawing.Point(648, 72); this.btnPrint.Name = "btnPrint"; this.btnPrint.Size = new System.Drawing.Size(96, 23); this.btnPrint.TabIndex = 11; this.btnPrint.Text = "Print"; this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click); // // dtDateDay // this.dtDateDay.Location = new System.Drawing.Point(448, 8); this.dtDateDay.Name = "dtDateDay"; this.dtDateDay.TabIndex = 10; this.dtDateDay.DateSelected += new System.Windows.Forms.DateRangeEventHandler(this.dtDateDay_DateSelected); // // dtClickDateTill // this.dtClickDateTill.Location = new System.Drawing.Point(248, 8); this.dtClickDateTill.Name = "dtClickDateTill"; this.dtClickDateTill.TabIndex = 9; // // dtClickDate // this.dtClickDate.Location = new System.Drawing.Point(8, 8); this.dtClickDate.Name = "dtClickDate"; this.dtClickDate.TabIndex = 8; // // label3 // this.label3.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label3.Location = new System.Drawing.Point(206, 64); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(36, 22); this.label3.TabIndex = 7; this.label3.Text = "TO"; // // btn_View // this.btn_View.Location = new System.Drawing.Point(206, 112); this.btn_View.Name = "btn_View"; this.btn_View.Size = new System.Drawing.Size(32, 23); this.btn_View.TabIndex = 6; this.btn_View.Text = "View"; this.btn_View.Click += new System.EventHandler(this.btn_View_Click); // // dtClickDateTill2 // this.dtClickDateTill2.Anchor = System.Windows.Forms.AnchorStyles.None; this.dtClickDateTill2.EditValue = null; this.dtClickDateTill2.Location = new System.Drawing.Point(280, 66); this.dtClickDateTill2.Name = "dtClickDateTill2"; // // dtClickDateTill2.Properties // this.dtClickDateTill2.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D; this.dtClickDateTill2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); this.dtClickDateTill2.Properties.DisplayFormat.FormatString = "dd/MM/yyyy"; this.dtClickDateTill2.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDateTill2.Properties.EditFormat.FormatString = "dd/MM/yyyy"; this.dtClickDateTill2.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDateTill2.Properties.Mask.EditMask = "dd/MM/yyyy"; this.dtClickDateTill2.Size = new System.Drawing.Size(108, 22); this.dtClickDateTill2.TabIndex = 4; // // dtClickDate1 // this.dtClickDate1.Anchor = System.Windows.Forms.AnchorStyles.None; this.dtClickDate1.EditValue = null; this.dtClickDate1.Location = new System.Drawing.Point(48, 34); this.dtClickDate1.Name = "dtClickDate1"; // // dtClickDate1.Properties // this.dtClickDate1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D; this.dtClickDate1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); this.dtClickDate1.Properties.DisplayFormat.FormatString = "dd/MM/yyyy"; this.dtClickDate1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDate1.Properties.EditFormat.FormatString = "dd/MM/yyyy"; this.dtClickDate1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; this.dtClickDate1.Properties.Mask.EditMask = "dd/MM/yyyy"; this.dtClickDate1.Size = new System.Drawing.Size(108, 22); this.dtClickDate1.TabIndex = 1; // // btnExport // this.btnExport.Location = new System.Drawing.Point(648, 32); this.btnExport.Name = "btnExport"; this.btnExport.Size = new System.Drawing.Size(96, 23); this.btnExport.TabIndex = 7; this.btnExport.Text = "Export To Excel"; this.btnExport.Visible = false; this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // gridMaster // // // gridMaster.EmbeddedNavigator // this.gridMaster.EmbeddedNavigator.Name = ""; this.gridMaster.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); gridLevelNode1.RelationName = "Level1"; this.gridMaster.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] { gridLevelNode1 }); this.gridMaster.Location = new System.Drawing.Point(0, 168); this.gridMaster.MainView = this.gridMasterView; this.gridMaster.Name = "gridMaster"; this.gridMaster.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.lk_Category }); this.gridMaster.Size = new System.Drawing.Size(784, 352); this.gridMaster.TabIndex = 5; this.gridMaster.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridMasterView }); // // gridMasterView // this.gridMasterView.ActiveFilterEnabled = false; this.gridMasterView.Appearance.GroupPanel.BackColor = System.Drawing.Color.White; this.gridMasterView.Appearance.GroupPanel.BorderColor = System.Drawing.Color.White; this.gridMasterView.Appearance.GroupPanel.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold); this.gridMasterView.Appearance.GroupPanel.ForeColor = System.Drawing.Color.Black; this.gridMasterView.Appearance.GroupPanel.Options.UseBackColor = true; this.gridMasterView.Appearance.GroupPanel.Options.UseBorderColor = true; this.gridMasterView.Appearance.GroupPanel.Options.UseFont = true; this.gridMasterView.Appearance.GroupPanel.Options.UseForeColor = true; this.gridMasterView.Appearance.HeaderPanel.ForeColor = System.Drawing.Color.Black; this.gridMasterView.Appearance.HeaderPanel.Options.UseForeColor = true; this.gridMasterView.AppearancePrint.HeaderPanel.ForeColor = System.Drawing.Color.Black; this.gridMasterView.AppearancePrint.HeaderPanel.Options.UseForeColor = true; this.gridMasterView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D; this.gridMasterView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.nCategory }); this.gridMasterView.GridControl = this.gridMaster; this.gridMasterView.GroupPanelText = "hELLO"; this.gridMasterView.Name = "gridMasterView"; this.gridMasterView.OptionsBehavior.Editable = false; this.gridMasterView.OptionsCustomization.AllowFilter = false; this.gridMasterView.OptionsCustomization.AllowSort = false; this.gridMasterView.OptionsPrint.PrintGroupFooter = false; this.gridMasterView.OptionsPrint.UsePrintStyles = true; this.gridMasterView.OptionsView.ShowFilterPanel = false; this.gridMasterView.OptionsView.ShowFooter = true; // // nCategory // this.nCategory.Caption = "Category"; this.nCategory.FieldName = "strReportGroup"; this.nCategory.Name = "nCategory"; this.nCategory.Visible = true; this.nCategory.VisibleIndex = 0; this.nCategory.Width = 100; // // lk_Category // this.lk_Category.AutoHeight = false; this.lk_Category.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); this.lk_Category.Name = "lk_Category"; // // printingSystem1 // this.printingSystem1.Links.AddRange(new object[] { this.printableComponentLink1 }); // // printableComponentLink1 // this.printableComponentLink1.Component = this.gridMaster; this.printableComponentLink1.Landscape = true; this.printableComponentLink1.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); this.printableComponentLink1.PaperKind = System.Drawing.Printing.PaperKind.A4; this.printableComponentLink1.PrintingSystem = this.printingSystem1; // // RPAllIncome // this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.ClientSize = new System.Drawing.Size(784, 512); this.Controls.Add(this.groupBox1); this.Controls.Add(this.gridMaster); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "RPAllIncome"; this.Text = "RPAllIncome"; this.Load += new System.EventHandler(this.RPAllIncome_Load); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dtClickDateTill2.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dtClickDate1.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMaster)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridMasterView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lk_Category)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).EndInit(); this.ResumeLayout(false); }
/* * "[Page #]" (represented via the PreviewStringId.PageInfo_PageNumber property) * "[Page # of Pages #]" (represented via the PreviewStringId.PageInfo_PageNumberOfTotal property) * "[Date Printed]" (represented via the PreviewStringId.PageInfo_PageDate property) * "[Time Printed]" (represented via the PreviewStringId.PageInfo_PageTime property) * "[User Name]" (represented via the PreviewStringId.PageInfo_PageUserName property) */ public static PrintableComponentLink GetPrintableComponentLink( IPrintable gridControl, String reportHeader, Image ReportHeaderImage, String rtfGridHeader, float rtfGridHeaderHeight, String mainTitle, String subTitle, String reportFooter, String rtfGridFooter) { float height = 0; DevExpress.XtraPrinting.PrintingSystem printingSystem1; printingSystem1 = new DevExpress.XtraPrinting.PrintingSystem(); ((System.ComponentModel.ISupportInitialize)(printingSystem1)).BeginInit(); DevExpress.XtraPrinting.PrintableComponentLink printableComponentLink1; printableComponentLink1 = new DevExpress.XtraPrinting.PrintableComponentLink(); printableComponentLink1.PaperKind = System.Drawing.Printing.PaperKind.A4; printableComponentLink1.Margins.Left = 50; printableComponentLink1.Margins.Right = 50; printableComponentLink1.Margins.Top = 50; printableComponentLink1.Margins.Bottom = 50; printingSystem1.Links.AddRange(new object[] { printableComponentLink1 }); printableComponentLink1.Component = gridControl; printableComponentLink1.PrintingSystem = printingSystem1; DevExpress.XtraPrinting.PageHeaderArea headerArea; headerArea = new DevExpress.XtraPrinting.PageHeaderArea(); headerArea.Content.Add(reportHeader); headerArea.LineAlignment = DevExpress.XtraPrinting.BrickAlignment.Near; #region Đầu trang if (rtfGridHeader != null) { printableComponentLink1.RtfReportHeader = rtfGridHeader; height = rtfGridHeaderHeight; } printableComponentLink1.CreateReportHeaderArea += delegate(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { float currentHeight = height; #region Giải pháp 1 Image headerImage = (ReportHeaderImage == null ? FWImageDic.LOGO_IMAGE48 : ReportHeaderImage); DevExpress.XtraPrinting.ImageBrick logo; logo = e.Graph.DrawImage(headerImage, new RectangleF(10, 5, headerImage.Width, headerImage.Height), DevExpress.XtraPrinting.BorderSide.None, Color.Transparent); //currentHeight += headerImage.Height; #endregion if (mainTitle != null) { DevExpress.XtraPrinting.TextBrick brick; brick = e.Graph.DrawString(mainTitle, Color.Navy, new RectangleF(0, currentHeight, 620, 40), DevExpress.XtraPrinting.BorderSide.None); currentHeight += 40; brick.Font = new Font("Tahoma", 20); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); brick.BackColor = Color.White; brick.ForeColor = Color.Black; } if (subTitle != null) { DevExpress.XtraPrinting.TextBrick brickDate; brickDate = e.Graph.DrawString(subTitle, Color.Navy, new RectangleF(0, currentHeight, 620, 40), DevExpress.XtraPrinting.BorderSide.None); currentHeight += 40; brickDate.Font = new Font("Tahoma", 10); brickDate.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); brickDate.BackColor = Color.White; brickDate.ForeColor = Color.Black; } }; #endregion if(rtfGridFooter!= null) printableComponentLink1.RtfReportFooter = rtfGridFooter; #region Header Footer DevExpress.XtraPrinting.PageFooterArea footerArea; footerArea = new DevExpress.XtraPrinting.PageFooterArea(); footerArea.Content.Add(reportFooter); footerArea.LineAlignment = DevExpress.XtraPrinting.BrickAlignment.Near; DevExpress.XtraPrinting.PageHeaderFooter pageHeaderFooter; pageHeaderFooter = new DevExpress.XtraPrinting.PageHeaderFooter(headerArea, footerArea); printableComponentLink1.PageHeaderFooter = pageHeaderFooter; #endregion ((System.ComponentModel.ISupportInitialize)(printingSystem1)).EndInit(); printableComponentLink1.CreateDocument(); return printableComponentLink1; }
public BalanceReportTemplatePrint(object sourceData, object sourceHeaderData, object objBalance, object frontPageReport) { InitializeComponent(); var bal = (Balance)objBalance; HeaderData headerdata = (HeaderData)sourceHeaderData; if (string.IsNullOrEmpty(headerdata.BalanceName)) { headerdata.BalanceName = Uniconta.ClientTools.Localization.lookup("ReportCriteria"); } headerdata.AccountColWidth = bal.ColumnSizeAccount == (byte)0 ? 80 : bal.ColumnSizeAccount; headerdata.AccountNameColWidth = bal.ColumnSizeName == (byte)0 ? 200 : bal.ColumnSizeName; headerdata.LineSpace = new Thickness(0, 0, 0, bal.LineSpace); headerdata.LeftMargin = new Thickness(bal.LeftMargin, 0, 0, 0); headerdata.DimColWidth = bal.ColumnSizeDim == (byte)0 ? 90 : bal.ColumnSizeDim; headerdata.DClblWidth = bal.ColumnSizeAmount == (byte)0 ? 100 : bal.ColumnSizeAmount; headerdata.FontSize = bal.FontSize == 0 ? 12 : bal.FontSize; headerdata.AmountSize = bal.ColumnSizeAmount; #if !SILVERLIGHT List <List <TemplateDataItems> > simpleLinkItems = new List <List <TemplateDataItems> >(); var currentItems = ((TemplateDataContext)sourceData).TemplateReportlist; List <TemplateDataItems> currentLinkItems = new List <TemplateDataItems>(); for (int i = 0; i < currentItems.Count; i++) { currentLinkItems.Add(currentItems[i]); if (currentItems[i].IsNewPage == Visibility.Visible) { simpleLinkItems.Add(currentLinkItems); currentLinkItems = new List <TemplateDataItems>(); } if (i == currentItems.Count - 1) { simpleLinkItems.Add(currentLinkItems); } } DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); ps.Graph.PageBackColor = System.Drawing.Color.Transparent; //Setting the default Printer if (!string.IsNullOrEmpty(session.User._Printer)) { ps.PageSettings.PrinterName = session.User._Printer; } List <TemplatedLink> links = new List <TemplatedLink>(); var frontPageText = bal._FrontPage; if (!string.IsNullOrEmpty(frontPageText) && bal._PrintFrontPage) { if (frontPageReport is DevExpress.XtraReports.UI.XtraReport) { var balanceFrontPageList = StandardPrintReportPage.AssignWatermark(frontPageReport as DevExpress.XtraReports.UI.XtraReport); ps.Pages.AddRange(balanceFrontPageList); } else { var frontPageLink = BalanceReportPrint.CreateFrontPageLink(frontPageText, bal._Landscape, bal.FontSize, (DataTemplate)this.Resources["frontPageHeaderTemplate"]); frontPageLink.CreateDocument(false); links.Add(frontPageLink); } } foreach (List <TemplateDataItems> e in simpleLinkItems) { var templateLink = CreateLink(headerdata, e, ((Balance)objBalance)._Landscape); templateLink.CreateDocument(false); links.Add(templateLink); } foreach (var link in links) { ps.Pages.AddRange(link.PrintingSystem.Pages); } custPrint.DocumentSource = ps; #endif #if SILVERLIGHT TemplatePrintBaseModule printbase = new TemplatePrintBaseModule(); printbase.PageHeaderTemplate = (DataTemplate)this.Resources["pageHeaderTemplate"]; printbase.DetailTemplate = (DataTemplate)this.Resources["detailTemplate"]; printbase.HeaderTemplateDataContext = headerdata; printbase.DetailsTemplateDataContext = (TemplateDataContext)sourceData; printbase.HeaderTemplateDataContext._Landscape = ((Balance)objBalance)._Landscape; this.DataContext = printbase; #endif }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.pnlSettings = new System.Windows.Forms.Panel(); this.smplEdit = new DevExpress.XtraEditors.SimpleButton(); this.printControl = new DevExpress.XtraPrinting.Control.PrintControl(); this.printingSystem = new DevExpress.XtraPrinting.PrintingSystem(this.components); this.panelControl1 = new DevExpress.XtraEditors.PanelControl(); this.pnlSettings.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit(); this.panelControl1.SuspendLayout(); this.SuspendLayout(); // // pnlSettings // this.pnlSettings.Controls.Add(this.smplEdit); this.pnlSettings.Dock = System.Windows.Forms.DockStyle.Top; this.pnlSettings.Location = new System.Drawing.Point(0, 0); this.pnlSettings.Name = "pnlSettings"; this.pnlSettings.Size = new System.Drawing.Size(700, 36); this.pnlSettings.TabIndex = 0; // // smplEdit // this.smplEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.smplEdit.Location = new System.Drawing.Point(619, 6); this.smplEdit.Name = "smplEdit"; this.smplEdit.Size = new System.Drawing.Size(75, 24); this.smplEdit.TabIndex = 2; this.smplEdit.Text = "Edit"; this.smplEdit.Visible = false; this.smplEdit.Click += new System.EventHandler(this.simpleButton1_Click); // // printControl // this.printControl.BackColor = System.Drawing.Color.Empty; this.printControl.Dock = System.Windows.Forms.DockStyle.Fill; this.printControl.ForeColor = System.Drawing.Color.Empty; this.printControl.IsMetric = false; this.printControl.Location = new System.Drawing.Point(2, 2); this.printControl.Name = "printControl"; this.printControl.PrintingSystem = this.printingSystem; this.printControl.Size = new System.Drawing.Size(696, 356); this.printControl.TabIndex = 1; this.printControl.TabStop = false; this.printControl.TooltipFont = new System.Drawing.Font("Tahoma", 9F); // // panelControl1 // this.panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat; this.panelControl1.Controls.Add(this.printControl); this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.panelControl1.Location = new System.Drawing.Point(0, 36); this.panelControl1.Name = "panelControl1"; this.panelControl1.Size = new System.Drawing.Size(700, 360); this.panelControl1.TabIndex = 4; // // PreviewControl // this.Controls.Add(this.panelControl1); this.Controls.Add(this.pnlSettings); this.Name = "PreviewControl"; this.Size = new System.Drawing.Size(700, 396); this.pnlSettings.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.printingSystem)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit(); this.panelControl1.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1)); this.button1 = new System.Windows.Forms.Button(); this.printPreviewDialog2 = new System.Windows.Forms.PrintPreviewDialog(); this.printingSystem1 = new DevExpress.XtraPrinting.PrintingSystem(this.components); this.link1 = new DevExpress.XtraPrinting.Link(this.components); this.printPreviewBar1 = new DevExpress.XtraPrinting.Preview.PrintPreviewBar(); this.printPreviewBarButton1 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton2 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton3 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton1 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton4 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton5 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton6 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton7 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton8 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton2 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton9 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton10 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton11 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton12 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton3 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton13 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton14 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton15 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton16 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton4 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton17 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton18 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton19 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton5 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton20 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printPreviewBarButton21 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.toolBarButton6 = new System.Windows.Forms.ToolBarButton(); this.printPreviewBarButton22 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton(); this.printControl1 = new DevExpress.XtraPrinting.Control.PrintControl(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.helpProvider1 = new System.Windows.Forms.HelpProvider(); this.textBox1 = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).BeginInit(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(120, 72); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(64, 32); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.Click += new System.EventHandler(this.button1_Click); // // printPreviewDialog2 // this.printPreviewDialog2.AutoScrollMargin = new System.Drawing.Size(0, 0); this.printPreviewDialog2.AutoScrollMinSize = new System.Drawing.Size(0, 0); this.printPreviewDialog2.ClientSize = new System.Drawing.Size(400, 300); this.printPreviewDialog2.Enabled = true; this.printPreviewDialog2.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog2.Icon"))); this.printPreviewDialog2.Location = new System.Drawing.Point(47, 14); this.printPreviewDialog2.MinimumSize = new System.Drawing.Size(375, 250); this.printPreviewDialog2.Name = "printPreviewDialog2"; this.printPreviewDialog2.TransparencyKey = System.Drawing.Color.Empty; this.printPreviewDialog2.Visible = false; // // printingSystem1 // this.printingSystem1.Links.AddRange(new object[] { this.link1 }); // // link1 // this.link1.PrintingSystem = this.printingSystem1; // // printPreviewBar1 // this.printPreviewBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat; this.printPreviewBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] { this.printPreviewBarButton1, this.printPreviewBarButton2, this.printPreviewBarButton3, this.toolBarButton1, this.printPreviewBarButton4, this.printPreviewBarButton5, this.printPreviewBarButton6, this.printPreviewBarButton7, this.printPreviewBarButton8, this.toolBarButton2, this.printPreviewBarButton9, this.printPreviewBarButton10, this.printPreviewBarButton11, this.printPreviewBarButton12, this.toolBarButton3, this.printPreviewBarButton13, this.printPreviewBarButton14, this.printPreviewBarButton15, this.printPreviewBarButton16, this.toolBarButton4, this.printPreviewBarButton17, this.printPreviewBarButton18, this.printPreviewBarButton19, this.toolBarButton5, this.printPreviewBarButton20, this.printPreviewBarButton21, this.toolBarButton6, this.printPreviewBarButton22 }); this.printPreviewBar1.ButtonSize = new System.Drawing.Size(16, 16); this.printPreviewBar1.DropDownArrows = true; this.printPreviewBar1.Location = new System.Drawing.Point(0, 0); this.printPreviewBar1.Name = "printPreviewBar1"; this.printPreviewBar1.PrintControl = this.printControl1; this.printPreviewBar1.ShowToolTips = true; this.printPreviewBar1.Size = new System.Drawing.Size(560, 72); this.printPreviewBar1.TabIndex = 1; // // printPreviewBarButton1 // this.printPreviewBarButton1.Command = DevExpress.XtraPrinting.PrintingSystemCommand.DocumentMap; this.printPreviewBarButton1.Enabled = false; this.printPreviewBarButton1.ImageIndex = 19; this.printPreviewBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton1.ToolTipText = "Document Map"; // // printPreviewBarButton2 // this.printPreviewBarButton2.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Find; this.printPreviewBarButton2.Enabled = false; this.printPreviewBarButton2.ImageIndex = 20; this.printPreviewBarButton2.ToolTipText = "Search"; // // printPreviewBarButton3 // this.printPreviewBarButton3.Command = DevExpress.XtraPrinting.PrintingSystemCommand.HandTool; this.printPreviewBarButton3.Enabled = false; this.printPreviewBarButton3.ImageIndex = 16; this.printPreviewBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton3.ToolTipText = "Hand Tool"; // // toolBarButton1 // this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton4 // this.printPreviewBarButton4.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Customize; this.printPreviewBarButton4.Enabled = false; this.printPreviewBarButton4.ImageIndex = 14; this.printPreviewBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton4.ToolTipText = "Customize"; // // printPreviewBarButton5 // this.printPreviewBarButton5.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Print; this.printPreviewBarButton5.Enabled = false; this.printPreviewBarButton5.ImageIndex = 0; this.printPreviewBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton5.ToolTipText = "Print"; // // printPreviewBarButton6 // this.printPreviewBarButton6.Command = DevExpress.XtraPrinting.PrintingSystemCommand.PrintDirect; this.printPreviewBarButton6.Enabled = false; this.printPreviewBarButton6.ImageIndex = 1; this.printPreviewBarButton6.ToolTipText = "Print Direct"; // // printPreviewBarButton7 // this.printPreviewBarButton7.Command = DevExpress.XtraPrinting.PrintingSystemCommand.PageSetup; this.printPreviewBarButton7.Enabled = false; this.printPreviewBarButton7.ImageIndex = 2; this.printPreviewBarButton7.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton7.ToolTipText = "Page Setup"; // // printPreviewBarButton8 // this.printPreviewBarButton8.Command = DevExpress.XtraPrinting.PrintingSystemCommand.EditPageHF; this.printPreviewBarButton8.Enabled = false; this.printPreviewBarButton8.ImageIndex = 15; this.printPreviewBarButton8.ToolTipText = "Header And Footer"; // // toolBarButton2 // this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton9 // this.printPreviewBarButton9.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Magnifier; this.printPreviewBarButton9.Enabled = false; this.printPreviewBarButton9.ImageIndex = 3; this.printPreviewBarButton9.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton9.ToolTipText = "Magnifier"; // // printPreviewBarButton10 // this.printPreviewBarButton10.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ZoomIn; this.printPreviewBarButton10.Enabled = false; this.printPreviewBarButton10.ImageIndex = 4; this.printPreviewBarButton10.ToolTipText = "缩小"; // // printPreviewBarButton11 // this.printPreviewBarButton11.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ZoomOut; this.printPreviewBarButton11.Enabled = false; this.printPreviewBarButton11.ImageIndex = 5; this.printPreviewBarButton11.ToolTipText = "Zoom Out"; // // printPreviewBarButton12 // this.printPreviewBarButton12.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Zoom; this.printPreviewBarButton12.Enabled = false; this.printPreviewBarButton12.ImageIndex = 6; this.printPreviewBarButton12.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; this.printPreviewBarButton12.ToolTipText = "Zoom"; // // toolBarButton3 // this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton13 // this.printPreviewBarButton13.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowFirstPage; this.printPreviewBarButton13.Enabled = false; this.printPreviewBarButton13.ImageIndex = 7; this.printPreviewBarButton13.ToolTipText = "First Page"; // // printPreviewBarButton14 // this.printPreviewBarButton14.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowPrevPage; this.printPreviewBarButton14.Enabled = false; this.printPreviewBarButton14.ImageIndex = 8; this.printPreviewBarButton14.ToolTipText = "Previous Page"; // // printPreviewBarButton15 // this.printPreviewBarButton15.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowNextPage; this.printPreviewBarButton15.Enabled = false; this.printPreviewBarButton15.ImageIndex = 9; this.printPreviewBarButton15.ToolTipText = "Next Page"; // // printPreviewBarButton16 // this.printPreviewBarButton16.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ShowLastPage; this.printPreviewBarButton16.Enabled = false; this.printPreviewBarButton16.ImageIndex = 10; this.printPreviewBarButton16.ToolTipText = "Last Page"; // // toolBarButton4 // this.toolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton17 // this.printPreviewBarButton17.Command = DevExpress.XtraPrinting.PrintingSystemCommand.MultiplePages; this.printPreviewBarButton17.Enabled = false; this.printPreviewBarButton17.ImageIndex = 11; this.printPreviewBarButton17.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton17.ToolTipText = "Multiple Pages"; // // printPreviewBarButton18 // this.printPreviewBarButton18.Command = DevExpress.XtraPrinting.PrintingSystemCommand.FillBackground; this.printPreviewBarButton18.Enabled = false; this.printPreviewBarButton18.ImageIndex = 12; this.printPreviewBarButton18.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; this.printPreviewBarButton18.ToolTipText = "Background"; // // printPreviewBarButton19 // this.printPreviewBarButton19.Command = DevExpress.XtraPrinting.PrintingSystemCommand.Watermark; this.printPreviewBarButton19.Enabled = false; this.printPreviewBarButton19.ImageIndex = 21; this.printPreviewBarButton19.ToolTipText = "Watermark"; // // toolBarButton5 // this.toolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton20 // this.printPreviewBarButton20.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ExportFile; this.printPreviewBarButton20.Enabled = false; this.printPreviewBarButton20.ImageIndex = 18; this.printPreviewBarButton20.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; this.printPreviewBarButton20.ToolTipText = "Export Document..."; // // printPreviewBarButton21 // this.printPreviewBarButton21.Command = DevExpress.XtraPrinting.PrintingSystemCommand.SendFile; this.printPreviewBarButton21.Enabled = false; this.printPreviewBarButton21.ImageIndex = 17; this.printPreviewBarButton21.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; this.printPreviewBarButton21.ToolTipText = "Send e-mail..."; // // toolBarButton6 // this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // printPreviewBarButton22 // this.printPreviewBarButton22.Command = DevExpress.XtraPrinting.PrintingSystemCommand.ClosePreview; this.printPreviewBarButton22.Enabled = false; this.printPreviewBarButton22.ImageIndex = 13; this.printPreviewBarButton22.ToolTipText = "Close Preview"; // // printControl1 // this.printControl1.IsMetric = true; this.printControl1.Location = new System.Drawing.Point(48, 112); this.printControl1.Name = "printControl1"; this.printControl1.PrintingSystem = this.printingSystem1; this.printControl1.Size = new System.Drawing.Size(488, 344); this.printControl1.TabIndex = 2; this.printControl1.TabStop = false; this.printControl1.Text = "printControl1"; // // groupBox1 // this.groupBox1.Location = new System.Drawing.Point(256, 48); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(160, 56); this.groupBox1.TabIndex = 3; this.groupBox1.TabStop = false; this.groupBox1.Text = "groupBox1"; // // helpProvider1 // this.helpProvider1.HelpNamespace = "G:\\ReleaseFile\\(8-10)ReleaseWithoutCheckCard\\创智智能晨检网络管理系统联机丛书.chm"; // // textBox1 // this.helpProvider1.SetHelpKeyword(this.textBox1, "硬件"); this.helpProvider1.SetHelpNavigator(this.textBox1, System.Windows.Forms.HelpNavigator.KeywordIndex); this.helpProvider1.SetHelpString(this.textBox1, ""); this.textBox1.Location = new System.Drawing.Point(440, 80); this.textBox1.Name = "textBox1"; this.helpProvider1.SetShowHelp(this.textBox1, true); this.textBox1.TabIndex = 4; this.textBox1.Text = "textBox1"; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(560, 445); this.Controls.Add(this.textBox1); this.Controls.Add(this.groupBox1); this.Controls.Add(this.printControl1); this.Controls.Add(this.printPreviewBar1); this.Controls.Add(this.button1); this.helpProvider1.SetHelpString(this, ""); this.Name = "Form1"; this.helpProvider1.SetShowHelp(this, false); this.Text = "Form1"; this.Load += new System.EventHandler(this.Form1_Load); ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.pnlSettings = new System.Windows.Forms.Panel(); this.smplEdit = new DevExpress.XtraEditors.SimpleButton(); this.printControl = new DevExpress.XtraPrinting.Control.PrintControl(); this.printingSystem = new DevExpress.XtraPrinting.PrintingSystem(this.components); this.panelControl1 = new DevExpress.XtraEditors.PanelControl(); this.pnlSettings.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.printingSystem)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit(); this.panelControl1.SuspendLayout(); this.SuspendLayout(); // // pnlSettings // this.pnlSettings.Controls.Add(this.smplEdit); this.pnlSettings.Dock = System.Windows.Forms.DockStyle.Top; this.pnlSettings.Location = new System.Drawing.Point(0, 0); this.pnlSettings.Name = "pnlSettings"; this.pnlSettings.Size = new System.Drawing.Size(700, 36); this.pnlSettings.TabIndex = 0; // // smplEdit // this.smplEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.smplEdit.Location = new System.Drawing.Point(619, 6); this.smplEdit.Name = "smplEdit"; this.smplEdit.Size = new System.Drawing.Size(75, 24); this.smplEdit.TabIndex = 2; this.smplEdit.Text = "Edit"; this.smplEdit.Visible = false; this.smplEdit.Click += new System.EventHandler(this.simpleButton1_Click); // // printControl // this.printControl.BackColor = System.Drawing.Color.Empty; this.printControl.Dock = System.Windows.Forms.DockStyle.Fill; this.printControl.ForeColor = System.Drawing.Color.Empty; this.printControl.IsMetric = false; this.printControl.Location = new System.Drawing.Point(2, 2); this.printControl.Name = "printControl"; this.printControl.PrintingSystem = this.printingSystem; this.printControl.Size = new System.Drawing.Size(696, 356); this.printControl.TabIndex = 1; this.printControl.TabStop = false; this.printControl.TooltipFont = new System.Drawing.Font("Tahoma", 9F); // // panelControl1 // this.panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat; this.panelControl1.Controls.Add(this.printControl); this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.panelControl1.Location = new System.Drawing.Point(0, 36); this.panelControl1.Name = "panelControl1"; this.panelControl1.Size = new System.Drawing.Size(700, 360); this.panelControl1.TabIndex = 4; // // PreviewControl // this.Controls.Add(this.panelControl1); this.Controls.Add(this.pnlSettings); this.Name = "PreviewControl"; this.Size = new System.Drawing.Size(700, 396); this.pnlSettings.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.printingSystem)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit(); this.panelControl1.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// ��ʾ��ӡԤ������ /// </summary> /// <param name="component">������GridContronl����TreeList��������</param> /// <param name="headerTitle">����</param> /// <param name="landscape">true��ʾ����false��ʾ����</param> /// <param name="headerFont">��������</param> public static void ShowPreview(IPrintable component, string headerTitle, bool landscape, Font headerFont) { PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem(); DevExpress.XtraPrinting.PrintableComponentLink link = new DevExpress.XtraPrinting.PrintableComponentLink(ps); ps.Links.Add(link); link.Component = component;//��������ǿɴ�ӡ�IJ��� PageHeaderFooter phf = link.PageHeaderFooter as PageHeaderFooter; phf.Header.Content.AddRange(new string[]{"", headerTitle, ""}); phf.Header.Font = headerFont; phf.Header.LineAlignment = BrickAlignment.Center; phf.Footer.Content.AddRange(new string[] { DateTime.Now.ToString("yyyy-MM-dd"), "", "[Page # of Pages #]" }); phf.Footer.LineAlignment = BrickAlignment.Center; link.Landscape = landscape; link.CreateDocument(); //�����ĵ� //ps.PreviewFormEx.Menu.MenuItems[0].MenuItems.RemoveAt(6) ; //ps.PreviewFormEx.Menu.MenuItems[0].MenuItems.RemoveAt(5); //ps.PreviewFormEx.Menu.MenuItems[0].MenuItems.RemoveAt(4); //ps.PreviewFormEx.PrintPreviewBar.Buttons.RemoveAt(4); //ps.PreviewFormEx.PrintPreviewBar.Buttons.RemoveAt(23); //ps.PreviewFormEx.PrintPreviewBar.Buttons.RemoveAt(23);lgm ps.PreviewFormEx.Text=headerTitle; ps.PreviewFormEx.Show();//����Ԥ�� }