void Link2_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { string sHeader = null; TextBrick brick = default(TextBrick); sHeader = "Progress Details"; brick = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 600, 40), BorderSide.None); brick.Font = new Font("Arial", 11, FontStyle.Bold); brick.StringFormat = new BrickStringFormat(StringAlignment.Near); if (Convert.ToInt32(barcboProject.EditValue) > 0) { sHeader = "(" + cboCostCentre.GetDisplayText(Convert.ToInt32(barcboProject.EditValue)); } if (barcboProgress.EditValue.ToString() != "") { sHeader = String.Format("{0}-{1}", sHeader, cboType.GetDisplayText(barcboProgress.EditValue)); } if (barcboFlatType.EditValue.ToString() != "") { sHeader = String.Format("{0}-{1}", sHeader, cboFlatType.GetDisplayText(barcboFlatType.EditValue)); } if (Convert.ToInt32(barcboBlock.EditValue) > 0) { sHeader = String.Format("{0}-{1})", sHeader, CboBlock.GetDisplayText(Convert.ToInt32(barcboBlock.EditValue))); TextBrick brick1 = default(TextBrick); brick1 = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 800, 100), BorderSide.None); brick1.Font = new Font("Arial", 9, FontStyle.Bold); brick1.StringFormat = new BrickStringFormat(StringAlignment.Near); } }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { var info = new GeneralInfo(); info.LoadAll(); //var dtDate = new CalendarLib.DateTimePickerEx //{ // Value = DateTime.Now, // CustomFormat = "MM/dd/yyyy" //}; //DateTime dtCurrent = Convert.ToDateTime(dtDate.Text); string transferdate = lstTree.FocusedNode.GetDisplayText("Year"); if ((lstTree.FocusedNode.GetDisplayText("Date")) != "") { transferdate = (Convert.ToDateTime(lstTree.FocusedNode.GetDisplayText("Date"))).ToShortDateString(); } string refNumber = lstTree.FocusedNode.GetDisplayText("RefNo"); string header = info.HospitalName + "\n Transfer Activity Log, Store: " + lkToStore.Text + " \n RefNo: " + refNumber + " On " + transferdate + " E.C"; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 0, 800, 80), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Tahoma", 13); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); }
void link_CreateDetailArea(object sender, CreateAreaEventArgs e) { RecalcSize(); if (pageWidthInPixels < 100 || pageHeightInPixels < 100) { e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Center); e.Graph.DrawString("Very small size", Color.Red, new RectangleF(0, pageHeightInPixels / 2, pageWidthInPixels, pageHeightInPixels / 2), BorderSide.None); e.Graph.BackColor = Color.Transparent; e.Graph.DrawLine(new PointF(0, 0), new PointF(pageWidthInPixels, pageHeightInPixels), Color.Red, 2); e.Graph.DrawLine(new PointF(pageWidthInPixels, 0), new PointF(0, pageHeightInPixels), Color.Red, 2); return; } SizeF size = e.Graph.MeasureString(textEdit1.Text, pageWidthInPixels); e.Graph.DrawString(textEdit1.Text, Color.Blue, new RectangleF(0, 0, pageWidthInPixels, size.Height), BorderSide.All); e.Graph.DrawImage(chartBitmap, new RectangleF(0, size.Height, pageWidthInPixels, pageHeightInPixels - size.Height)); }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { var info = new GeneralInfo(); info.LoadAll(); string head = "Price Only Report"; TextBrick brick = e.Graph.DrawString(head, Color.Black, new RectangleF(400, 40, 200, 100), BorderSide.None); brick.Font = new Font("Tahoma", 13); string[] header = { info.HospitalName, "Date: " + dtDate.Text, "Store: " + cboStores.Text, "Category: " + lkCommodityTypes.Text }; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick1 = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); TextBrick brick3 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 60, 200, 100), BorderSide.None); TextBrick brick4 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(0, 80, 200, 100), BorderSide.None); }
private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { TextBrick brick = e.Graph.DrawString(soLuongSheets[flag_i].ToUpper(), System.Drawing.Color.DarkBlue, new RectangleF(0, 0, 500, 2000), BorderSide.All); //TextBrick brick = e.Graph.DrawString(soLuongSheets[flag_i - 1], System.Drawing.Color.DarkBlue, new RectangleF(0, 0, 500, 1200), BorderSide.None); flag_i++; }
private void printableComponentLink1_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e) { PageInfoBrick pib = new PageInfoBrick(); pib.Format = "Page {0}/{1}"; string Suppliername = "Supplied By: " + dtRec.AsDataView()[0]["SupplierName"] as string; string Receivername = "Received By: " + dtRec.AsDataView()[0]["ReceivedBy"] as string; //RectangleF r = RectangleF.Empty; //r.Height = 20; //r.X = 800; pib = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format, Color.Black, new RectangleF(100, 0, 200, 20), BorderSide.None); PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format + "\n Print Date " + DateTime.Now.ToShortDateString() + " G.C", Color.Black, new RectangleF(100, 0, 200, 40), BorderSide.None); brick.Alignment = BrickAlignment.Far; TextBrick brickleft = e.Graph.DrawString(Suppliername, Color.Navy, new RectangleF(0, 0, 200, 20), DevExpress.XtraPrinting.BorderSide.None); brickleft.Font = new Font("Tahoma", 10); brickleft.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); TextBrick brickrb = e.Graph.DrawString(Receivername, Color.Navy, new RectangleF(0, 20, 200, 20), DevExpress.XtraPrinting.BorderSide.None); brickrb.Font = new Font("Tahoma", 10); brickrb.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); }
private void printableComponentLink1_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e) { PageInfoBrick pib = new PageInfoBrick(); pib.Format = "Page {0}/{1}"; DataTable dt = (DataTable)gridIssues.DataSource; DataView dv = new DataView(dt); string Issuedto = "Issued To: " + dv[0]["IssuedTo"] as string; string Issuedby = "Issued By: " + dv[0]["IssuedBy"] as string; //RectangleF r = RectangleF.Empty; //r.Height = 20; //pib = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format, Color.Black, r, BorderSide.None); //PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, "Print Date " +DateTime.Now.ToShortDateString() + " G.C", // Color.Black, r, BorderSide.None); //brick.Alignment = BrickAlignment.Far; pib = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format, Color.Black, new RectangleF(100, 0, 200, 20), BorderSide.None); PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format + "\n Print Date " + DateTime.Now.ToShortDateString() + " G.C", Color.Black, new RectangleF(100, 0, 200, 40), BorderSide.None); brick.Alignment = BrickAlignment.Far; TextBrick brickleft = e.Graph.DrawString(Issuedto, Color.Navy, new RectangleF(0, 0, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brickleft.Font = new Font("Tahoma", 10); brickleft.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); TextBrick brickrb = e.Graph.DrawString(Issuedby, Color.Navy, new RectangleF(0, 20, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brickrb.Font = new Font("Tahoma", 10); brickrb.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { string[] header = { "Account: " + lkAccount.Text }; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); }
void Link3_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { if (grdViewAbs.FocusedRowHandle < 0 && grdViewProj.FocusedRowHandle < 0 && grdViewUnit.FocusedRowHandle < 0) { return; } string sBrokerName = grdViewAbs.GetFocusedRowCellValue("BrokerName").ToString(); string sCCName = grdViewProj.GetFocusedRowCellValue("CostCentreName").ToString(); string sHeader = null; DevExpress.XtraPrinting.TextBrick brick = default(DevExpress.XtraPrinting.TextBrick); if (grdViewUnit.RowCount > 0) { sHeader = "Buyerwise Payable -" + sBrokerName + "(" + sCCName + ")"; } else { sHeader = "Buyerwise Payable"; } brick = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 11, FontStyle.Bold); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); }
void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { string sHeader = null; string sHeader1 = null; DevExpress.XtraPrinting.TextBrick brick = default(DevExpress.XtraPrinting.TextBrick); DevExpress.XtraPrinting.TextBrick brick1 = default(DevExpress.XtraPrinting.TextBrick); if (m_sType == "F") { sHeader = "Payment Info For Fiscal Year " + sFiscalYear + "" + " - " + m_sFlatNo; } else { sHeader = "Payment Info " + " - " + m_sCCName + "(" + m_sFlatNo + ")"; } brick = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 11, FontStyle.Bold); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); brick1 = e.Graph.DrawString(sHeader1, Color.Navy, new RectangleF(0, 40, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brick1.Font = new Font("Arial", 11, FontStyle.Bold); brick1.StringFormat = new BrickStringFormat(StringAlignment.Near); }
private void Print_CreateReportHeaderArea(object sender, CreateAreaEventArgs e) { if (Config.GetValue("TenCongTy") != null) { string info = Config.GetValue("TenCongTy").ToString(); if (Config.GetValue("DiaChi") != null) { info += "\n" + Config.GetValue("DiaChi").ToString(); } e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Near); e.Graph.Font = new Font("Times New Roman", 10, FontStyle.Bold); e.Graph.BackColor = Color.Transparent; RectangleF rec1 = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50); e.Graph.DrawString(info, Color.Black, rec1, BorderSide.None); } string reportHeader = "BẢNG HOA HỒNG NHÂN VIÊN KINH DOANH"; e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Center); e.Graph.Font = new Font("Times New Roman", 20, FontStyle.Bold); e.Graph.BackColor = Color.Transparent; RectangleF rec2 = new RectangleF(0, 50, e.Graph.ClientPageSize.Width, 50); e.Graph.DrawString(reportHeader, Color.Black, rec2, BorderSide.None); }
private void link_CreateDetailArea(object sender, CreateAreaEventArgs e) { //MWSCreateAreaEventArgs newEvent = new MWSCreateAreaEventArgs(); //newEvent.PageNum = e.Graph.PrintingSystem.Pages.Count; //newEvent.NumOfTotal = 100000; //this.OnDetailCreated(newEvent); }
void CreateMarginalFooterArea(object sender, CreateAreaEventArgs e) { TextBrick brick = e.Graph.DrawString(Footer1, Color.Black, new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 20), BorderSide.None); brick.Font = new Font("Tahoma", 12, FontStyle.Bold); brick.StringFormat = new BrickStringFormat(StringAlignment.Center); if (string.IsNullOrEmpty(Footer2)) { TextBrick brick1 = e.Graph.DrawString(Footer2, Color.Black, new RectangleF(0, 40, e.Graph.ClientPageSize.Width, 20), BorderSide.None); brick1.Font = new Font("Tahoma", 10, FontStyle.Bold); brick1.StringFormat = new BrickStringFormat(StringAlignment.Center); } if (string.IsNullOrEmpty(Footer3)) { TextBrick brick2 = e.Graph.DrawString(Heading3, Color.Black, new RectangleF(50, 80, e.Graph.ClientPageSize.Width, 20), BorderSide.None); brick2.Font = new Font("Tahoma", 10, FontStyle.Bold); brick2.StringFormat = new BrickStringFormat(StringAlignment.Center); } }
void Link4_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { string sHeader = null; DevExpress.XtraPrinting.TextBrick brick = default(DevExpress.XtraPrinting.TextBrick); sHeader = "Project Wise Receivable"; brick = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 11, FontStyle.Bold); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); if (grdFlatView.RowCount > 0) { sHeader = "Project Name: " + m_sProjectName + " As On " + string.Format(Convert.ToDateTime(dxDate.EditValue).ToShortDateString()) + ""; } else { sHeader = "Project Name: "; } brick = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 40, 800, 60), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 9, FontStyle.Bold); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); }
private void Link_CreateMarginalHeaderAreaVital(object sender, CreateAreaEventArgs e) { GeneralInfo info = new GeneralInfo(); info.LoadAll(); string head = "Facility Availability Status Report"; string[] header = { info.HospitalName, "Date: " + cboMonth.Text + "/" + cboYear.Text, "Store: " + cboStores.Text, "Generated On: " + dtDate.Text }; //string[] headerright = { "Category: " + lkCommodityTypes.Text, "Status: " + cboStatus.Text, "Program: " + cboSubProgram.Text }; pcl.Landscape = true; pcl.PageHeaderFooter = header; TextBrick brick0 = e.Graph.DrawString(head, Color.DarkBlue, new RectangleF(300, 10, 800, 400), BorderSide.None); TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 40, 350, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 60, 350, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(700, 40, 400, 100), BorderSide.None); TextBrick brick3 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(700, 60, 400, 100), BorderSide.None); brick0.Font = new Font("Tahoma", 16); //TextBrick brickright = e.Graph.DrawString(headerright[0], Color.DarkBlue, new RectangleF(800, 20, 600, 100), BorderSide.None); //TextBrick brickright1 = e.Graph.DrawString(headerright[1], Color.DarkBlue, new RectangleF(800, 40, 600, 100), BorderSide.None); //TextBrick brickright2 = e.Graph.DrawString(headerright[2], Color.DarkBlue, new RectangleF(800, 60, 600, 100), BorderSide.None); // brickright.HorzAlignment = brickright1.HorzAlignment = brickright2.HorzAlignment = DevExpress.Utils.HorzAlignment.Near; }
private void PrintableComponentLink_CreateReportHeaderArea(object sender, CreateAreaEventArgs e) { TextBrick brick = e.Graph.DrawString(m_GridReportTitle, Color.Black, new RectangleF(0, 5, 600, 25), BorderSide.None); brick.Font = new Font("Arial", 14, FontStyle.Bold); brick.StringFormat = new BrickStringFormat(StringAlignment.Center); }
// ghi tên doanh nghiệp, địa chỉ doanh nghiệp, tên báo cáo mặc định private void printableComponentLink_CreateReportHeaderArea(object sender, CreateAreaEventArgs e) { object tmp; EasyParam.GetValue("Tên đơn vị", out tmp, ParamCategory.CompanyInfo, "TÊN DOANH NGHIỆP", DataType.String); var companyName = tmp.ToString(); EasyParam.GetValue("Địa chỉ đơn vị", out tmp, ParamCategory.CompanyInfo, "123-ABC", DataType.String); var address = tmp.ToString(); RectangleF rec; var s = string.Empty; s = string.Format("Đơn vị: {0}", companyName); e.Graph.Font = new Font("Tahoma", 10, FontStyle.Regular); rec = new RectangleF(0, 0, 400, 20); e.Graph.DrawString(s, Color.Black, rec, BorderSide.None); s = string.Format("Địa chỉ: {0}", address); e.Graph.Font = new Font("Tahoma", 10, FontStyle.Regular); rec = new RectangleF(0, 20, 400, 20); e.Graph.DrawString(s, Color.Black, rec, BorderSide.None); // ve tieu de e.Graph.Font = new Font("Tahoma", 16, FontStyle.Bold); rec = new RectangleF(200, 50, 450, 30); e.Graph.DrawString(PrintCaption.ToUpper(), Color.Black, rec, BorderSide.None); }
void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { DevExpress.XtraPrinting.TextBrick brick = default(DevExpress.XtraPrinting.TextBrick); brick = e.Graph.DrawString("Cancel Register", Color.Navy, new RectangleF(0, 20, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 11, FontStyle.Bold); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); }
private static int WriteParameterValues(string key, string value, CreateAreaEventArgs e, int top) { var height = top; var words = value.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); var line = string.Empty; var isFirstLine = true; foreach (var word in words) { if (GetSizeOfText(line + word, ParameterFontNormal).Width > 700) { var keyData = isFirstLine ? key : " "; height += PrintData(keyData, line, e, height); line = word + " "; isFirstLine = false; } else { line += word + " "; } } if (!string.IsNullOrEmpty(line)) { var keyData = isFirstLine ? key : " "; height += PrintData(keyData, line, e, height); } return(height); }
void Link5_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { string sHeader = null; string sHeader1 = null; DevExpress.XtraPrinting.TextBrick brick = default(DevExpress.XtraPrinting.TextBrick); DevExpress.XtraPrinting.TextBrick brick1 = default(DevExpress.XtraPrinting.TextBrick); sHeader = "Payment Info" + " - " + m_sFlatNo + " (" + m_sBuyerName + ")"; sHeader1 = m_sCCName + " - " + m_sFlatType + " - " + m_sBlockName + " - " + m_sLevelName; brick = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 11, FontStyle.Bold); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); brick1 = e.Graph.DrawString(sHeader1, Color.Navy, new RectangleF(0, 40, 600, 40), DevExpress.XtraPrinting.BorderSide.None); brick1.Font = new Font("Arial", 11, FontStyle.Bold); brick1.StringFormat = new BrickStringFormat(StringAlignment.Near); //string sHeader = null; //DevExpress.XtraPrinting.TextBrick brick = default(DevExpress.XtraPrinting.TextBrick); //sHeader = "Payment Info-" + m_sBuyerName; //brick = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 600, 40), DevExpress.XtraPrinting.BorderSide.None); //brick.Font = new Font("Arial", 11, FontStyle.Bold); //brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); }
private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { var info = new GeneralInfo(); info.LoadAll(); int year = Convert.ToInt32(cboYear.EditValue); int month = 10; int day = 30; if (year == dtCurrent.Year) { month = dtCurrent.Month; day = dtCurrent.Day; } DateTime startDate = EthiopianDate.EthiopianDate.EthiopianToGregorian(String.Format("{0}/{1}/{2}", 1, 11, year - 1)); DateTime endDate = EthiopianDate.EthiopianDate.EthiopianToGregorian(String.Format("{0}/{1}/{2}", day, month, year)); DateTime currentDate = EthiopianDate.EthiopianDate.EthiopianToGregorian(String.Format("{0}/{1}/{2}", dtCurrent.Day, dtCurrent.Month, dtCurrent.Year)); string strStartDate = EthiopianDate.EthiopianDate.GregorianToEthiopian(startDate); string strEndDate = EthiopianDate.EthiopianDate.GregorianToEthiopian(endDate); string strCurrentDate = EthiopianDate.EthiopianDate.GregorianToEthiopian(currentDate); string[] header = { info.HospitalName, "General Expiry For Current Year", "From Start Date: " + strStartDate, "To End Date: " + strEndDate, "Printed Date: " + strCurrentDate }; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); TextBrick brick3 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(160, 40, 200, 100), BorderSide.None); TextBrick brick4 = e.Graph.DrawString(header[4], Color.DarkBlue, new RectangleF(0, 60, 200, 100), BorderSide.None); }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { GeneralInfo info = new GeneralInfo(); info.LoadAll(); //CalendarLib.DateTimePickerEx dtDate = new CalendarLib.DateTimePickerEx //{ // Value = DateTime.Now, // CustomFormat = "MM/dd/yyyy" //}; //DateTime dtCurrent = Convert.ToDateTime(dtDate.Text); var headCenter = "Activity Log Report"; TextBrick brickcenter = e.Graph.DrawString(headCenter, Color.Navy, new RectangleF(0, 20, 1000, 120), DevExpress.XtraPrinting.BorderSide.None); brickcenter.Font = new Font("Tahoma", 13); brickcenter.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); var comHeader = info.HospitalName + "\nStore: " + cboStores.Text; string header = (!isIssue) ? comHeader + "\nReceived From " + dtFrom.Text + " To " + dtTo.Text + " E.C \nSupplier: " + lkSupplier.Text : comHeader + "\nIssued From " + dtFrom.Text + " To " + dtTo.Text + " E.C \nIssue Location: " + lklocation.Text; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 40, 1000, 120), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Tahoma", 12); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near); }
private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { GeneralInfo info = new GeneralInfo(); info.LoadAll(); // old header //string header = info.HospitalName + "Inventory Log of " + lblAdjDate.Text; //header with reference number and date included //CalendarLib.DateTimePickerEx dtDate = new CalendarLib.DateTimePickerEx //{ // Value = DateTime.Now, // CustomFormat = "MM/dd/yyyy" //}; //DateTime dtCurrent = Convert.ToDateTime(dtDate.Text); DataRow dr = gridView2.GetFocusedDataRow(); string invDate = Convert.ToString(dr["Year"]); string header = info.HospitalName + "\n Inventory Log of Year " + invDate + " E.C\n Store: " + cboStores.Text; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 0, 800, 100), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Tahoma", 13); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); }
private void PrintCompOnCreateReportHeaderArea(object sender, CreateAreaEventArgs createAreaEventArgs) { TextBrick brick = createAreaEventArgs.Graph.DrawString(txtSelectedFacility.Text + " Report", Color.Black, new RectangleF(0, 0, 500, 40), BorderSide.None); brick.Font = new Font("Tahoma", 12); brick.StringFormat = new BrickStringFormat(StringAlignment.Near); }
void footerLink_CreateDetailArea(object sender, CreateAreaEventArgs e) { TextBrick brick = new TextBrick(BorderSide.None, 0, Color.White, Color.Gray, Color.Blue); brick.Text = "some footer text"; brick.Rect = new RectangleF(0, 0, 400, 20); e.Graph.DrawBrick(brick); }
private void Link_CreateMarginalHeaderAreaRetur(object sender, CreateAreaEventArgs e) { PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, "KERTAS PADALARANG", Color.Black, new RectangleF(0, 0, 500, 40), BorderSide.None); brick.Alignment = BrickAlignment.Near; brick.AutoWidth = true; brick.Font = new Font("Time News Roman", 16, FontStyle.Bold); }
private void OnCreateReportHeaderArea(object sender, CreateAreaEventArgs e) { var reportHeader = string.Format("User Quiz Performance Report: {0} - {1}", _startDate.ToString("MM/dd/yy"), _endDate.AddDays(-1).ToString("MM/dd/yy")); e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Center); e.Graph.Font = new Font("Arial", 12, FontStyle.Bold); var rec = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50); e.Graph.DrawString(reportHeader, Color.Black, rec, BorderSide.None); }
void printableComponentLink1_CreateReportFooterArea(object sender, CreateAreaEventArgs e) { TextBrick brick = e.Graph.DrawString("My Report Footer", Color.Navy, new RectangleF(0, 10, 400, 40), BorderSide.None); brick.BackColor = Color.White; brick.Font = new Font("Tahoma", 16); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); }
// Creates an interval between grids and fills it with color. void linkMainReport_CreateDetailArea(object sender, CreateAreaEventArgs e) { TextBrick tb = new TextBrick(); tb.Rect = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50); tb.BackColor = Color.Gray; e.Graph.DrawBrick(tb); }
void link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Near); e.Graph.Font = new Font("Tahoma", 11, FontStyle.Bold); RectangleF rec = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50); e.Graph.DrawString(mReportTitle, Color.Black, rec, BorderSide.None); }
void CreateMarginalDetailHeaderArea(object sender, CreateAreaEventArgs e) { string phead = "Purchase Invoice List"; TextBrick brick1; brick1 = e.Graph.DrawString(phead, Color.Black, new RectangleF(0, 20, e.Graph.ClientPageSize.Width, 20),BorderSide.None); brick1.Font = new Font("Tahoma", 10, FontStyle.Bold); brick1.StringFormat = new BrickStringFormat(StringAlignment.Center); }
public static void gridPreviewTextoCabecalho(object sender, CreateAreaEventArgs e) { //Texto do cabeçalho/rodapé TextBrick brick = e.Graph.DrawString("Relatório", Color.Black, new RectangleF(300, 5, 500, 40), BorderSide.None); brick.Font = new Font("Arial", 16); brick.StringFormat = new BrickStringFormat(StringAlignment.Center); }
private void Link_CreateMarginalFooterAreaPendapatan(object sender, CreateAreaEventArgs e) { PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, "KERTAS PADALARSNG", Color.Black, new RectangleF(0, 0, 500, 40), BorderSide.None); brick.LineAlignment = BrickAlignment.Center; brick.Alignment = BrickAlignment.Far; brick.AutoWidth = true; brick.Font = new Font("Time News Roman", 10); }
private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { string[] header = { "Ending Balance for " + cboStores.Text + " of year " + EthiopianDate.EthiopianDate.Now.Year }; pcl.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(100, 0, 500, 300), BorderSide.None); //TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(20, 20, 200, 100), BorderSide.None); //TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(20, 40, 200, 100), BorderSide.None); }
private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, "授权支付明细表", Color.DarkBlue, new RectangleF(0, 0, 100, 30), BorderSide.None); brick.LineAlignment = BrickAlignment.Center; brick.Alignment = BrickAlignment.Center; brick.AutoWidth = true; brick.Font = new Font("宋体", 11f, FontStyle.Bold); }
void linkGrid1Report_CreateDetailArea(object sender, CreateAreaEventArgs e) { TextBrick tb = new TextBrick(); tb.Text = strReportHeader; tb.Font = new Font("Arial",15); tb.Rect = new RectangleF(0, 0, 500, 25); tb.BorderWidth = 0; tb.BackColor = Color.Transparent; tb.HorzAlignment = DevExpress.Utils.HorzAlignment.Near; e.Graph.DrawBrick(tb); }
void CreateMarginalDetailHeaderArea(object sender, CreateAreaEventArgs e) { TextBrick brick = e.Graph.DrawString(Heading1, Color.Black, new RectangleF(0, 30, e.Graph.ClientPageSize.Width, 20), BorderSide.None); brick.Font = new Font("Tahoma", 12, FontStyle.Bold); brick.StringFormat = new BrickStringFormat(StringAlignment.Center); TextBrick brick1 = e.Graph.DrawString(Heading2, Color.Black, new RectangleF(0, 50, e.Graph.ClientPageSize.Width, 20), BorderSide.None); brick1.Font = new Font("Tahoma", 10, FontStyle.Bold); brick1.StringFormat = new BrickStringFormat(StringAlignment.Center); if(useHeading3) { TextBrick brick2 = e.Graph.DrawString(Heading3, Color.Black, new RectangleF(60, 80, e.Graph.ClientPageSize.Width, 20), BorderSide.None); brick2.Font = new Font("Tahoma", 10, FontStyle.Bold); brick2.StringFormat = new BrickStringFormat(StringAlignment.Center); } }
private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { GeneralInfo info = new GeneralInfo(); info.LoadAll(); // old header //string header = info.HospitalName + "Inventory Log of " + lblAdjDate.Text; //header with reference number and date included CalendarLib.DateTimePickerEx dtDate = new CalendarLib.DateTimePickerEx { Value = DateTime.Now, CustomFormat = "MM/dd/yyyy" }; DateTime dtCurrent = Convert.ToDateTime(dtDate.Text); string header = info.HospitalName + "Inventory Log of " + lblAdjDate.Text + " " + dtCurrent.ToString("MM dd,yyyy"); printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString("", Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header, Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString("", Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); }
void CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { TextBrick brick; var dt = DateTime.Parse(barEditItem1.EditValue.ToString()); string phead = "Daily Sales report " + dt.ToString("dd-MM-yyyy hh:mm:ss tt") + " " + watermark; brick = e.Graph.DrawString(Utils.Companyname, Color.Black, new RectangleF(0, 20, e.Graph.ClientPageSize.Width, 100), BorderSide.None); brick.Font = new Font("Tahoma", 12, FontStyle.Bold); brick.StringFormat = new BrickStringFormat(StringAlignment.Center); TextBrick brick1; brick1 = e.Graph.DrawString(phead, Color.Black, new RectangleF(0, 40, e.Graph.ClientPageSize.Width, 100), BorderSide.None); brick1.Font = new Font("Tahoma", 10, FontStyle.Regular); brick1.StringFormat = new BrickStringFormat(StringAlignment.Center); //TextBrick brick2; //brick1 = e.Graph.DrawString(watermark, Color.Black, new RectangleF(0, 30, e.Graph.ClientPageSize.Width, 100), // BorderSide.None); //brick1.Font = new Font("Tahoma", 12, FontStyle.Bold); //brick1.StringFormat = new BrickStringFormat(StringAlignment.Far); }
/// <summary> /// 添加页眉 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraPrinting.CreateAreaEventArgs"/> instance containing the event data.</param> private void pcl_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { if (!String.IsNullOrEmpty(reportTitle) && reportTitle.Length > 0) { e.Graph.Font = new Font("宋体", 15, FontStyle.Bold); e.Graph.BackColor = Color.Transparent; RectangleF r = new RectangleF(0, 20, 0, e.Graph.Font.Height + 20); PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, reportTitle, Color.Black, r, BorderSide.None); brick.Alignment = BrickAlignment.Center; brick.AutoWidth = true; } if (!String.IsNullOrEmpty(condition)) { e.Graph.Font = new Font("宋体", 10); e.Graph.BackColor = Color.Transparent; RectangleF r = new RectangleF(0, 50, 0, e.Graph.Font.Height + 20); PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, condition, Color.Black, r, BorderSide.None); brick.Alignment = BrickAlignment.Center; brick.AutoWidth = true; } }
/// <summary> /// 添加页脚 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraPrinting.CreateAreaEventArgs"/> instance containing the event data.</param> private void pcl_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e) { string format = "第{0}页 共{1}页"; e.Graph.Font = new Font("宋体", 10); e.Graph.BackColor = Color.Transparent; RectangleF r = new RectangleF(0, 5, 0, e.Graph.Font.Height + 20); PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, format, Color.Black, r, BorderSide.None); brick.Alignment = BrickAlignment.Far; brick.AutoWidth = true; brick = e.Graph.DrawPageInfo(PageInfo.DateTime, "打印时间:" + DateTime.Today.ToLongDateString(), Color.Black, r, BorderSide.None); brick.Alignment = BrickAlignment.Near; brick.AutoWidth = true; }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { var info = new GeneralInfo(); info.LoadAll(); switch (filter) { case "Over Stocked": { string[] header = {"Over Stocked Items Report", info.HospitalName, "Date: " + dtDate.Text, "Store: " + cboStores.Text }; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); TextBrick brick3 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(0, 60, 200, 100), BorderSide.None); } break; case "Stock Out": { string[] header = { "Stocked Out Items Report", info.HospitalName, "Date: " + dtDate.Text, "Store: " + cboStores.Text }; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); TextBrick brick3 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(0, 60, 200, 100), BorderSide.None); } break; } }
private static void linkMainReport_CreateDetailArea(object sender, CreateAreaEventArgs e) { TextBrick tb = new TextBrick(); tb.Rect = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50); tb.BackColor = Color.White; e.Graph.DrawBrick(tb); }
/// <summary> /// For the printable component link, we are setting up a header. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { string[] header = { txtitmName.Text, "Date: " + dtDate.Text, " Basic Unit: " + lblBUnit.Text }; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); }
private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { dtIssueDate.CustomFormat = "MM/dd/yyyy"; var dtCurrent = ConvertDate.DateConverter(dtIssueDate.Text); string[] header = { "Issue Pick List ", "Date: " + dtCurrent.ToShortDateString(), " Ref No: " + txtConfRef.Text, "From: " + txtStore.Text, "To: " + txtIssuedTo.Text }; printableComponentLink2.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(20, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(20, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(20, 40, 200, 100), BorderSide.None); TextBrick brick3 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(300, 20, 200, 100), BorderSide.None); TextBrick brick4 = e.Graph.DrawString(header[4], Color.DarkBlue, new RectangleF(300, 40, 200, 100), BorderSide.None); }
/// <summary> /// Creates a marginal header area for the pcl object /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { GeneralInfo info = new GeneralInfo(); info.LoadAll(); string[] header = { info.HospitalName , "Date:" + dtDate.Text, "Store: " + cboStores.Text }; pcl.Landscape = true; pcl.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); }
private void OnCreateReportHeaderArea(object sender, CreateAreaEventArgs e) { var reportHeader = string.Format("quickSITES & Emails: {0} - {1}", dateEditStart.DateTime.ToString("MM/dd/yy"), dateEditEnd.DateTime.AddDays(-1).ToString("MM/dd/yy")); e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Center); e.Graph.Font = new Font("Arial", 12, FontStyle.Bold); var rec = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50); e.Graph.DrawString(reportHeader, Color.Black, rec, BorderSide.None); }
/// <summary> /// 打印数据表格时,生成表头信息 /// </summary> /// <param name="sender">数据表格对象</param> /// <param name="e"></param> private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.DateTime, "", Color.DarkBlue, new RectangleF(0, 0, 100, 20), DevExpress.XtraPrinting.BorderSide.None); brick.LineAlignment = BrickAlignment.Center; brick.Alignment = BrickAlignment.Center; brick.AutoWidth = true; }
private static void linkChartReport_CreateDetailArea(object sender, CreateAreaEventArgs e) { TextBrick tb = new TextBrick(); tb.Text = ""; tb.Font = new Font("Tahoma", 12, FontStyle.Bold); tb.Rect = new RectangleF(0, 0, 600, 25); tb.BorderWidth = 0; tb.BackColor = Color.Transparent; tb.HorzAlignment = DevExpress.Utils.HorzAlignment.Center; e.Graph.DrawBrick(tb); }
void pcl_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e) { //e.Graph.DrawString("All", new RectangleF(0, 0, 500, 30)); }
private void printableComponentLink2_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { dtIssueDate.CustomFormat = "MM/dd/yyyy"; DateTime dtCurrent = ConvertDate.DateConverter(dtIssueDate.Text); string[] header = { "Pick List ", "Date: " + dtCurrent.ToShortDateString(), " Ref No: " + txtConfRef.Text, "From: " + txtStore.Text, "To: " + txtIssuedTo.Text }; printableComponentLink2.PageHeaderFooter = header; }
private void link_CreateReportFooterArea(object sender, CreateAreaEventArgs e) { throw new NotImplementedException(); }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e) { var info = new GeneralInfo(); info.LoadAll(); string[] header = { info.HospitalName, "From Date:" + txtFromDate.Text, "To Date:" + dtTo.Text, "Store: " + cboStores.Text, "Printed Date:" + dtTo.Text }; printableComponentLink1.Landscape = true; printableComponentLink1.PageHeaderFooter = header; TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None); TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None); TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None); TextBrick brick3= e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(0, 60, 200, 100), BorderSide.None); }
void linkGrid1Report_CreateDetailArea(object sender, CreateAreaEventArgs e) { var tb = new TextBrick(); tb.Text = "Credit sales"; tb.Font = new Font("Tahoma", 12); tb.Rect = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50); tb.BorderWidth = 0; tb.BackColor = Color.Transparent; tb.HorzAlignment = HorzAlignment.Center; e.Graph.DrawBrick(tb); }
private void printableComponentLink_CreateReportFooterArea(object sender, CreateAreaEventArgs e) { // TODO: sửa lại load từ tham số các thông tin cần thiết RectangleF rec; var s = string.Empty; s = "Người lập biểu"; e.Graph.Font = new Font("Tahoma", 10, FontStyle.Regular); rec = new RectangleF(420, 20, 200, 20); e.Graph.BackColor = Color.Transparent; e.Graph.DrawString(s, Color.Black, rec, BorderSide.None); s = "Lệ phai - Lại phê ^^!"; e.Graph.Font = new Font("Tahoma", 10, FontStyle.Bold); rec = new RectangleF(420, 100, 200, 20); e.Graph.BackColor = Color.Transparent; e.Graph.DrawString(s, Color.Black, rec, BorderSide.None); }
private static void linkGrid1Report_CreateDetailArea(object sender, CreateAreaEventArgs e) { TextBrick tb = new TextBrick(); tb.Text = "Dữ Liệu Chi Tiết"; tb.Font = new Font("Arial", 12); tb.Rect = new RectangleF(0, 30, 600, 25); tb.BorderWidth = 0; tb.BackColor = Color.Transparent; tb.HorzAlignment = DevExpress.Utils.HorzAlignment.Center; e.Graph.DrawBrick(tb); }