// Create the Marginal Header section. private void link1_CreateMarginalHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { // Specify font and color settings for the brick graphics. e.Graph.Font = e.Graph.DefaultFont; e.Graph.BackColor = Color.Transparent; // Set the format string for a page info brick. string format = "Page {0} of {1}"; // Set the rectangle for a page info brick. RectangleF r = new RectangleF(0, 0, 0, e.Graph.Font.Height); // Draw a page info brick, which displays page numbers. PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, format, Color.Black, r, BorderSide.None); // Set brick alignment. brick.Alignment = BrickAlignment.Far; // Enable the auto width option for a brick. brick.AutoWidth = true; // Draw a page info brick, which displays current date and time. brick = e.Graph.DrawPageInfo(PageInfo.DateTime, "", Color.Black, r, BorderSide.None); // Set a brick's alignment. brick.Alignment = BrickAlignment.Near; // Enable the auto width option for a brick. brick.AutoWidth = true; }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, DevExpress.XtraPrinting.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, "Store: " + cboStores.Text, " 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 _PrintableLink_CreatePageHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { if (_PrintParam != null && _PrintParam.PageHeaderTitle != null && _PrintParam.PageHeaderTitle.Length > 0) { RectangleF r = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, e.Graph.Font.Height); TextBrick brick = e.Graph.DrawString(_PrintParam.PageHeaderTitle, Color.Blue, r, BorderSide.None); brick.StringFormat = new BrickStringFormat(StringAlignment.Far); } }
private void _PrintableLink_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { if (_PrintParam != null && _PrintParam.ReportHeaderTitle != null && _PrintParam.ReportHeaderTitle.Length > 0) { RectangleF r = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, REPORT_HEADER_HEIGHT); TextBrick brick = e.Graph.DrawString(_PrintParam.ReportHeaderTitle, Color.Black, r, BorderSide.None); brick.StringFormat = new BrickStringFormat(StringAlignment.Center); brick.Font = getDefaultFont(12F, FontStyle.Bold); } }
// Create the Marginal Footer section. private void link1_CreateDetailFooterArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { // Set the background color to Coral. backColor = Color.Coral; // Set the foreground color to White. foreColor = Color.White; // Add the detail header data to the detail footer section. link1_CreateDetailHeaderArea(sender, e); }
private void link1_CreateDetailArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { // Create a new rectangle. Rectangle r = new Rectangle(0, 0, 150, 50); int top = r.Top; // Change string format settings for the brick graphics. e.Graph.StringFormat = e.Graph.StringFormat.ChangeAlignment(StringAlignment.Near); e.Graph.StringFormat = e.Graph.StringFormat.ChangeLineAlignment(StringAlignment.Center); // Specify font and color settings for the brick graphics. e.Graph.Font = new Font("Tahoma", 16, FontStyle.Bold | FontStyle.Italic); e.Graph.BackColor = Color.DeepSkyBlue; e.Graph.BorderColor = Color.MidnightBlue; // Draw a text brick with "Hello World!". e.Graph.DrawString("Hello World!", Color.Red, r, BorderSide.All); // Change font settings for the brick graphics. e.Graph.Font = new Font("Arial", 14, FontStyle.Bold); // Draw a text brick with "Good-bye!". top += 50; e.Graph.DrawString("Good-bye!", Color.Blue, new Rectangle(0, top, 150, 50), BorderSide.All); // Change color settings for the brick graphics. e.Graph.BackColor = Color.LightSkyBlue; // Draw a check box brick with the unchecked mark. e.Graph.DrawCheckBox(new Rectangle(150, 0, 50, 50), false); // Draw a check box brick with the checked mark. e.Graph.DrawCheckBox(new Rectangle(150, top, 50, 50), true); // Draw borders around bricks. e.Graph.DrawRect(new Rectangle(200, 0, 50, 50), BorderSide.All, Color.Lavender, e.Graph.BorderColor); e.Graph.DrawRect(new Rectangle(200, top, 50, 50), BorderSide.All, Color.Lavender, e.Graph.BorderColor); // Draw an image brick. Bitmap img = new Bitmap(1, 1);//= Properties.Resources.excel32; img.MakeTransparent(); e.Graph.DrawImage(img, new Rectangle(200 + (50 - img.Width) / 2, top + (50 - img.Height) / 2, img.Width, img.Height), BorderSide.None, Color.Transparent); }
// Create the Detail Header section. private void link1_CreateDetailHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { // Specify font and alignment settings for the brick graphics. e.Graph.Font = new Font("Comic Sans MS", 12); e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Center, StringAlignment.Center); // Set background and foreground colors to predefined values. e.Graph.BackColor = backColor; e.Graph.ForeColor = foreColor; // Draw 3 bricks containing "I love you". e.Graph.DrawString("I", new Rectangle(0, 0, 150, 25)); e.Graph.DrawString("love", new Rectangle(150, 0, 50, 25)); e.Graph.DrawString("you", new Rectangle(200, 0, 50, 25)); }
private void printableComponentLink1_CreateMarginalHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { var info = new GeneralInfo(); info.LoadAll(); string[] header = { info.HospitalName, "Store: " + cboStores.Text, "Printed Date:" + dtDate.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); }
private void _PrintableLink_CreatePageFooterArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { string format = "当前页:{0} 总页数 {1}"; e.Graph.Font = e.Graph.DefaultFont; e.Graph.BackColor = Color.Transparent; RectangleF r = new RectangleF(0, 0, 0, e.Graph.Font.Height); 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, "", Color.Black, r, BorderSide.None); brick.Alignment = BrickAlignment.Near; brick.AutoWidth = true; }
private static void PclCreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { var info = new GeneralInfo(); info.LoadAll(); var dtDate = new DateTimePickerEx { Value = DateTime.Now, CustomFormat = "MM/dd/yyyy" }; DateTime dtCurrent = Convert.ToDateTime(dtDate.Text); //Old header string header = info.HospitalName + " Loss/Adjustment Activity Log " + dtCurrent.ToString("MM dd,yyyy"); TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 0, 500, 40), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 16); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); }
private void PrintableComponentLink_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { // Specify required settings for the brick graphics. BrickGraphics brickGraphics = e.Graph; brickGraphics.BackColor = Color.White; brickGraphics.Font = new Font("Times New Roman", 8); // Declare bricks. PageInfoBrick pageInfoBrick; PageImageBrick pageImageBrick; // Define the image to display. Image pageImage = TaxesSystem.Properties.Resources.logo_option2; // Display the PageImageBrick containing the DevExpress logo. pageImageBrick = brickGraphics.DrawPageImage(pageImage, new Rectangle(856, 0, 100, 120), BorderSide.None, Color.Transparent); pageImageBrick.Alignment = BrickAlignment.Far; // Display the PageInfoBrick containing date-time information. Date-time information is displayed // in the left part of the MarginalHeader section using the FullDateTimePattern. //{0:F} pageInfoBrick = brickGraphics.DrawPageInfo(PageInfo.DateTime, "{0:MM/dd/yyyy hh:mm tt}", Color.Black, new Rectangle(840, 130, 120, 50), BorderSide.None); pageInfoBrick.Alignment = BrickAlignment.Far; // Declare text strings. string devexpress = title; // Specify required settings for the brick graphics. BrickGraphics brickGraphics2 = e.Graph; brickGraphics2.BackColor = Color.White; brickGraphics2.Font = new Font("Times New Roman", 16, FontStyle.Bold); // Display the DevExpress text string. SizeF size = brickGraphics2.MeasureString(devexpress); pageInfoBrick = brickGraphics2.DrawPageInfo(PageInfo.None, devexpress, Color.Black, new RectangleF(new PointF(440, 50), size), BorderSide.None); pageInfoBrick.Alignment = BrickAlignment.Center; pageInfoBrick.HorzAlignment = DevExpress.Utils.HorzAlignment.Center; }
private void link_CreateMarginalHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { if (mReportName != "") { e.Graph.Font = new Font("微软雅黑", 12, 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, mReportName, Color.Black, r, BorderSide.None); brick.Alignment = BrickAlignment.Center; //brick.LineAlignment = BrickAlignment.Near; brick.AutoWidth = true; } if (mCondition != "") { e.Graph.Font = new Font("微软雅黑", 9, FontStyle.Bold); e.Graph.BackColor = Color.Transparent; RectangleF r = new RectangleF(0, 50, 0, e.Graph.Font.Height + 20); PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, mCondition, Color.Black, r, BorderSide.None); brick.Alignment = BrickAlignment.Near; brick.AutoWidth = true; } }
private void PrintableComponentLink_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { /*// Specify required settings for the brick graphics. * BrickGraphics brickGraphics = e.Graph; * brickGraphics.BackColor = Color.White; * brickGraphics.Font = new Font("Neo Sans Arabic", 8); * * // Declare bricks. * PageInfoBrick pageInfoBrick; * PageImageBrick pageImageBrick; * * // Define the image to display. * Image pageImage = TaxesSystem.Properties.Resources.Logo; * * // Display the PageImageBrick containing the DevExpress logo. * pageImageBrick = brickGraphics.DrawPageImage(pageImage, new Rectangle(856, 0, 100, 80), BorderSide.None, Color.Transparent); * pageImageBrick.Alignment = BrickAlignment.Far; * * // Display the PageInfoBrick containing date-time information. Date-time information is displayed * // in the left part of the MarginalHeader section using the FullDateTimePattern. * //{0:F} * pageInfoBrick = brickGraphics.DrawPageInfo(PageInfo.DateTime, "{0:MM/dd/yyyy hh:mm tt}", Color.Black, new Rectangle(840, 90, 120, 50), BorderSide.None); * pageInfoBrick.Alignment = BrickAlignment.Far; * * * // Declare text strings. * string devexpress = "تقرير العملاء"; * // Specify required settings for the brick graphics. * BrickGraphics brickGraphics2 = e.Graph; * brickGraphics2.BackColor = Color.White; * brickGraphics2.Font = new Font("Neo Sans Arabic", 14, FontStyle.Bold); * * // Display the DevExpress text string. * SizeF size = brickGraphics2.MeasureString(devexpress); * pageInfoBrick = brickGraphics2.DrawPageInfo(PageInfo.None, devexpress, Color.Black, new RectangleF(new PointF(440, 50), size), BorderSide.None); * pageInfoBrick.Alignment = BrickAlignment.Center;*/ }
private void pcl_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.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); // original header // string header = info.HospitalName + " Receive Activity Log " + dtCurrent.ToString("MM dd,yyyy"); // header with reference number string refNumber = lstTree.FocusedNode.GetDisplayText("RefNo"); string header = info.HospitalName + " Transfer Activity Log \n" + dtCurrent.ToString("MM dd,yyyy") + " RefNo " + refNumber; TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 0, 500, 40), DevExpress.XtraPrinting.BorderSide.None); brick.Font = new Font("Arial", 16); brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center); }
private void PrintableComponentLink_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { // Specify required settings for the brick graphics. BrickGraphics brickGraphics = e.Graph; Height = 100; brickGraphics.BackColor = Color.White; brickGraphics.Font = new Font("Neo Sans Arabic", 10); // Declare bricks. PageInfoBrick pageInfoBrickFrom; PageInfoBrick pageInfoBrickTo; PageInfoBrick pageInfoBrick; PageInfoBrick pageInfo; PageInfoBrick pageInfo1; PageImageBrick pageImageBrick; // Define the image to display. Image pageImage = TaxesSystem.Properties.Resources.logo_option2; // Display the PageImageBrick containing the DevExpress logo. pageImageBrick = brickGraphics.DrawPageImage(pageImage, new Rectangle(10, 0, 80, 100), BorderSide.None, Color.Transparent); pageImageBrick.Alignment = BrickAlignment.Far; // Display the PageInfoBrick containing date-time information. Date-time information is displayed // in the left part of the MarginalHeader section using the FullDateTimePattern. //{0:F} pageInfoBrickFrom = brickGraphics.DrawPageInfo(PageInfo.None, ":من", Color.Black, new Rectangle(180, 110, 60, 80), BorderSide.None); pageInfoBrickFrom.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickFrom = brickGraphics.DrawPageInfo(PageInfo.None, d.dateFrom, Color.Black, new Rectangle(40, 110, 140, 80), BorderSide.None); pageInfoBrickFrom.Alignment = BrickAlignment.Near; pageInfoBrickFrom.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, ":الي", Color.Black, new Rectangle(180, 130, 60, 80), BorderSide.None); pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, d.dateTo, Color.Black, new Rectangle(40, 130, 140, 80), BorderSide.None); pageInfoBrickTo.Alignment = BrickAlignment.Near; pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); BrickGraphics brickGraphics1 = e.Graph; pageInfo = brickGraphics1.DrawPageInfo(PageInfo.None, d.delegateName, Color.Black, new Rectangle(525, 110, 180, 70), BorderSide.None); pageInfo.Alignment = BrickAlignment.Near; pageInfo.Font = new Font("Tahoma", 10, FontStyle.Bold); BrickGraphics brickGraphics3 = e.Graph; pageInfo1 = brickGraphics3.DrawPageInfo(PageInfo.None, d.company, Color.Black, new Rectangle(528, 130, 180, 70), BorderSide.None); pageInfo1.Alignment = BrickAlignment.Near; pageInfo1.Font = new Font("Tahoma", 10, FontStyle.Bold); if (d.company_profit_list != null) { pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, "الشركة", Color.Black, new Rectangle(525, 110, 100, 80), BorderSide.None); pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, "قيمة ربح المندوب", Color.Black, new Rectangle(528, 130, 150, 80), BorderSide.None); pageInfoBrickTo.Alignment = BrickAlignment.Far; pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); int y = 130; PageInfoBrick pageInfoBrick3; foreach (company_profit item in d.company_profit_list) { y += 20; pageInfoBrick3 = brickGraphics.DrawPageInfo(PageInfo.None, item.companyName, Color.Black, new Rectangle(725, y, 140, 80), BorderSide.None); pageInfoBrick3.Font = new Font("Tahoma", 10, FontStyle.Regular); pageInfoBrick3 = brickGraphics.DrawPageInfo(PageInfo.None, item.delegateProfit, Color.Black, new Rectangle(528, y, 140, 80), BorderSide.None); pageInfoBrick3.Alignment = BrickAlignment.Far; pageInfoBrick3.Font = new Font("Tahoma", 10, FontStyle.Regular); } pageInfoBrick3 = brickGraphics.DrawPageInfo(PageInfo.None, d.delegateProfit + ":اجمالي ربح المندوب ", Color.Black, new Rectangle(685, y + 40, 230, 80), BorderSide.None); pageInfoBrick3.Alignment = BrickAlignment.Far; pageInfoBrick3.Font = new Font("Tahoma", 11, FontStyle.Bold); } // Declare text strings. string devexpress = title; // Specify required settings for the brick graphics. BrickGraphics brickGraphics2 = e.Graph; brickGraphics2.BackColor = Color.White; brickGraphics2.Font = new Font("Times New Roman", 14, FontStyle.Bold); // Display the DevExpress text string. SizeF size = brickGraphics2.MeasureString(devexpress); pageInfoBrick = brickGraphics2.DrawPageInfo(PageInfo.None, devexpress, Color.Black, new RectangleF(new PointF(320, 50), size), BorderSide.None); pageInfoBrick.Alignment = BrickAlignment.Center; if (branchName != "") { SizeF sizea = brickGraphics2.MeasureString(branchName); pageInfoBrick = brickGraphics2.DrawPageInfo(PageInfo.None, branchName, Color.Black, new RectangleF(new PointF(370, 70), size), BorderSide.None); pageInfoBrick.Alignment = BrickAlignment.Center; } e.Graph.PrintingSystem.Document.PrintingSystem.PageMargins.Bottom = 0; }
private void PrintableComponentLink_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { // Specify required settings for the brick graphics. BrickGraphics brickGraphics = e.Graph; brickGraphics.BackColor = Color.White; brickGraphics.Font = new Font("Neo Sans Arabic", 10); // Declare bricks. PageInfoBrick pageInfoBrickFrom; PageInfoBrick pageInfoBrickTo; PageInfoBrick pageInfoBrick; PageInfoBrick pageInfo; PageInfoBrick pageInfo1; PageImageBrick pageImageBrick; // Define the image to display. Image pageImage = TaxesSystem.Properties.Resources.logo_option2; // Display the PageImageBrick containing the DevExpress logo. pageImageBrick = brickGraphics.DrawPageImage(pageImage, new Rectangle(10, 0, 150, 150), BorderSide.None, Color.Transparent); pageImageBrick.Alignment = BrickAlignment.Far; // Display the PageInfoBrick containing date-time information. Date-time information is displayed // in the left part of the MarginalHeader section using the FullDateTimePattern. //{0:F} pageInfoBrickFrom = brickGraphics.DrawPageInfo(PageInfo.None, ":العميل", Color.Black, new Rectangle(180, 160, 60, 80), BorderSide.None); pageInfoBrickFrom.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickFrom = brickGraphics.DrawPageInfo(PageInfo.None, d.dateFrom, Color.Black, new Rectangle(40, 160, 120, 80), BorderSide.None); pageInfoBrickFrom.Alignment = BrickAlignment.Near; pageInfoBrickFrom.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, ":تلفون العميل", Color.Black, new Rectangle(180, 180, 160, 80), BorderSide.None); pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, d.dateTo, Color.Black, new Rectangle(40, 180, 120, 80), BorderSide.None); pageInfoBrickTo.Alignment = BrickAlignment.Far; pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); BrickGraphics brickGraphics1 = e.Graph; pageInfo = brickGraphics1.DrawPageInfo(PageInfo.None, d.dateFrom, Color.Black, new Rectangle(825, 160, 120, 70), BorderSide.None); pageInfo.Alignment = BrickAlignment.Near; pageInfo.Font = new Font("Tahoma", 10, FontStyle.Bold); BrickGraphics brickGraphics3 = e.Graph; pageInfo1 = brickGraphics3.DrawPageInfo(PageInfo.None, d.dateTo, Color.Black, new Rectangle(828, 180, 120, 70), BorderSide.None); pageInfo1.Alignment = BrickAlignment.Near; pageInfo1.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, ":تاريخ الاسترجاع", Color.Black, new Rectangle(825, 240, 100, 80), BorderSide.None); pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); pageInfoBrickTo = brickGraphics.DrawPageInfo(PageInfo.None, ":سبب الاسترجاع", Color.Black, new Rectangle(628, 240, 150, 80), BorderSide.None); pageInfoBrickTo.Alignment = BrickAlignment.Far; pageInfoBrickTo.Font = new Font("Tahoma", 10, FontStyle.Bold); int y = 240; PageInfoBrick pageInfoBrick3; pageInfoBrick3 = brickGraphics.DrawPageInfo(PageInfo.None, d.delegateName, Color.Black, new Rectangle(825, y, 120, 80), BorderSide.None); pageInfoBrick3.Font = new Font("Tahoma", 10, FontStyle.Regular); pageInfoBrick3 = brickGraphics.DrawPageInfo(PageInfo.None, d.delegateProfit, Color.Black, new Rectangle(628, y, 150, 80), BorderSide.None); pageInfoBrick3.Alignment = BrickAlignment.Far; pageInfoBrick3.Font = new Font("Tahoma", 10, FontStyle.Regular); // Declare text strings. string devexpress = "أذن مرتجع"; // Specify required settings for the brick graphics. BrickGraphics brickGraphics2 = e.Graph; brickGraphics2.BackColor = Color.White; brickGraphics2.Font = new Font("Tahoma", 14, FontStyle.Bold); // Display the DevExpress text string. SizeF size = brickGraphics2.MeasureString(devexpress); pageInfoBrick = brickGraphics2.DrawPageInfo(PageInfo.None, devexpress, Color.Black, new RectangleF(new PointF(420, 50), size), BorderSide.None); pageInfoBrick.Alignment = BrickAlignment.Center; size = brickGraphics2.MeasureString(ReturnPermissionNum.ToString()); pageInfoBrick = brickGraphics2.DrawPageInfo(PageInfo.None, ReturnPermissionNum.ToString(), Color.Black, new RectangleF(new PointF(480, 80), size), BorderSide.None); pageInfoBrick.Alignment = BrickAlignment.Center; }
// ghi tên doanh nghiệp, địa chỉ doanh nghiệp, tên báo cáo mặc định private static void printableComponentLink_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e) { string companyName = "EASY COFFEE"; string address = "Thủ Đức, Hồ Chí Minh"; RectangleF rec; string s = string.Empty; string thoiGian = DateTime.Now.ToString("dd/MM/yyyy HH:mm"); s = string.Format("{0}", companyName); e.Graph.Font = new Font("SegoeUI", 12, FontStyle.Bold); rec = new RectangleF(5, 0, 400, 20); e.Graph.DrawString(s, Color.Black, rec, DevExpress.XtraPrinting.BorderSide.None); s = string.Format("{0}", address); e.Graph.Font = new Font("SegoeUI", 10, FontStyle.Regular); rec = new RectangleF(3, 20, 400, 20); e.Graph.DrawString(s, Color.Black, rec, DevExpress.XtraPrinting.BorderSide.None); e.Graph.Font = new Font("SegoeUI", 10, FontStyle.Regular); rec = new RectangleF(7, 40, 400, 20); e.Graph.DrawString(thoiGian, Color.Black, rec, DevExpress.XtraPrinting.BorderSide.None); // ve tieu de e.Graph.Font = new Font("Tahoma", 16, FontStyle.Bold); rec = new RectangleF(200, 50, 450, 50); e.Graph.DrawString(PrintCaption.ToUpper(), Color.BlueViolet, rec, DevExpress.XtraPrinting.BorderSide.None); }