Return to site

Devexpress Printablecomponentlink

broken image


C# (CSharp) DevExpress.XtraPrinting PrintableComponentLink - 6 examples found. These are the top rated real world C# (CSharp) examples of DevExpress.XtraPrinting.PrintableComponentLink extracted from open source projects. You can rate examples to help us improve the quality of examples. PrintableComponentLink ignores page range specified by the PrintSettings property. XtraReports Suite. Custom functions in the Expression Editor are not sorted alphabetically. DevExpress v20.1 Report item template is not available for VB.NET Web Applications.

1. 가로 스크롤 보이기

Printablecomponentlink

gridView1.OptionsView.ColumnAutoWidth = false;

gridView1 .HorzScrollVisibiity = Auto or Always

2. 프린터에서 필요없는 Footer 없애기

gridView1.OptionsPrint.PrintFooter = false;

3. 컬럼헤더 중앙정렬

gridview1 -> Column Properties -> Apperance Header -> TextOptions -> HAlignment = Center

4. 간단한 프린트 클래스 설정

using System;
using System.Collections.Generic;
using System.Text;
using DevExpress.XtraPrinting;
using System. Serial number idm. Drawing; Ytd new version 2017 free download.

namespace Test

{
class clsReport
{
string strTitle;
string _subContent=';
float _subHeight = 20;

System.Drawing.Printing.PaperKind PaperKind;

public string subContent { get { return _subContent; } set { _subContent = value; } }

#region Print with Title
// using DevExpress.XtraPrinting;

Kioti lb1914 owners manual. Our Repair Manual, Owner's Manuals and Parts Catalogs Downloads contain all information you'll need to perform repairs, look up parts or do routine maintenance on your machine. The manual includes pictures and easy to follow directions on what tools are needed and how the repair is performed. Kioti LB 1914 Workshop Service repair MAnual. Tractors Kioti LB1914 (4WD) Service Manual Paperback – July 25, 1989 by Misc. Tractors Manuals (Author) 4.5 out of 5 stars 2 ratings. See all formats and editions Hide other formats and editions. A lot of questions can come up when purchasing a tractor or UTV. And we're here to answer them. If you have a question, take a look at our FAQs. Two Models with Manual or Hydrostatic Transmission Shipping to North American Dealers WENDELL, N.C. (May 5, 2020) — KIOTI Tractor, a division of Daedong-USA, Inc., delivers land owners a durable and KIOTI.

public void Print(DevExpress.XtraPrinting.IPrintable pGrid, string pTitle, System.Drawing.Printing.PaperKind pPaperKind, bool pLandscape)
{
Print(pGrid, pTitle, pPaperKind, pLandscape, 20);
}

public void Print(DevExpress.XtraPrinting.IPrintable pGrid, string pTitle, System.Drawing.Printing.PaperKind pPaperKind, bool pLandscape, float subHeight)
{
strTitle = pTitle;
PaperKind = pPaperKind;
_subHeight = subHeight;
PrintableComponentLink link = new PrintableComponentLink(new PrintingSystem());
link.PaperKind = PaperKind;
link.Landscape = pLandscape;
link.Margins.Top = 100;
link.Margins.Bottom = 60;
link.Margins.Left = 50;
link.Margins.Right = 50;
link.Component = pGrid;
link.CreateMarginalHeaderArea += new CreateAreaEventHandler(Link_CreateMarginalHeaderArea);
link.CreateMarginalFooterArea += new CreateAreaEventHandler(Link_CreateMarginalFooterArea);
link.CreateDocument();
link.ShowPreview();
//link.ShowRibbonPreview(DevExpress.LookAndFeel.UserLookAndFeel.Default);
}


private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
{
PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, strTitle, Color.DarkBlue, new RectangleF(0, 0, 110, 50), BorderSide.None);
brick.LineAlignment = BrickAlignment.Center;
brick.Font = new Font('굴림체', 18);
brick.Alignment = BrickAlignment.Center;
brick.AutoWidth = true;

PageInfoBrick Lbrick = e.Graph.DrawPageInfo(PageInfo.DateTime, ', Color.DarkBlue, new RectangleF(0, 0, 100, 20), BorderSide.None);
Lbrick.LineAlignment = BrickAlignment.Far;
Lbrick.Font = new Font('굴림체', 9);
Lbrick.Alignment = BrickAlignment.Far;
Lbrick.AutoWidth = true;

if (_subContent != ')
{
PageInfoBrick Sbrick = e.Graph.DrawPageInfo(PageInfo.DateTime, _subContent, Color.DarkBlue, new RectangleF(0, 0, 100, _subHeight), BorderSide.None);
Sbrick.LineAlignment = BrickAlignment.Far;
Sbrick.Font = new Font('굴림체', 9);
Sbrick.Alignment = BrickAlignment.Near;
Sbrick.AutoWidth = true;
}

Devexpress printablecomponentlink page header footer


}

private void Link_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e)
{
PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, CUser.Company, Color.DarkBlue, new RectangleF(0, 0, 100, 20), BorderSide.None);
brick.LineAlignment = BrickAlignment.Near;
brick.Font = new Font('굴림체', 9);
brick.Alignment = BrickAlignment.Center;
brick.AutoWidth = true;

PageInfoBrick Lbrick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, ', Color.DarkBlue, new RectangleF(0, 0, 100, 20), BorderSide.None);
Lbrick.LineAlignment = BrickAlignment.Near;
Lbrick.Font = new Font('굴림체', 9);
Lbrick.Alignment = BrickAlignment.Far;
Lbrick.AutoWidth = true;
}
#endregion

}
}

※ 클래스 호출

clsReport cReport = new clsReport();
cReport.subContent = '조회조건 : ' + dtpFrom.Value.ToString('yyyy-MM-dd') ;
cReport.Print(gridControl2, '보고서', System.Drawing.Printing.PaperKind.A4, true);

gridView1.Columns.Clear();
var db = new SysPosDataContext();
var q = from u in db.TBL_SiparisCaris where u.Tarih >= Convert.ToDateTime(dateEdit1.EditValue) && u.Tarih <= Convert.ToDateTime(dateEdit2.EditValue) select new { u.Tarih, u.Tutar, u.OdemeTipi };
gridControl1.DataSource=q.ToList();
gridView1.OptionsView.ShowFooter = true;
gridView1.Columns[1].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;

Devexpress Printablecomponentlink

Header

gridView1.OptionsView.ColumnAutoWidth = false;

gridView1 .HorzScrollVisibiity = Auto or Always

2. 프린터에서 필요없는 Footer 없애기

gridView1.OptionsPrint.PrintFooter = false;

3. 컬럼헤더 중앙정렬

gridview1 -> Column Properties -> Apperance Header -> TextOptions -> HAlignment = Center

4. 간단한 프린트 클래스 설정

using System;
using System.Collections.Generic;
using System.Text;
using DevExpress.XtraPrinting;
using System. Serial number idm. Drawing; Ytd new version 2017 free download.

namespace Test

{
class clsReport
{
string strTitle;
string _subContent=';
float _subHeight = 20;

System.Drawing.Printing.PaperKind PaperKind;

public string subContent { get { return _subContent; } set { _subContent = value; } }

#region Print with Title
// using DevExpress.XtraPrinting;

Kioti lb1914 owners manual. Our Repair Manual, Owner's Manuals and Parts Catalogs Downloads contain all information you'll need to perform repairs, look up parts or do routine maintenance on your machine. The manual includes pictures and easy to follow directions on what tools are needed and how the repair is performed. Kioti LB 1914 Workshop Service repair MAnual. Tractors Kioti LB1914 (4WD) Service Manual Paperback – July 25, 1989 by Misc. Tractors Manuals (Author) 4.5 out of 5 stars 2 ratings. See all formats and editions Hide other formats and editions. A lot of questions can come up when purchasing a tractor or UTV. And we're here to answer them. If you have a question, take a look at our FAQs. Two Models with Manual or Hydrostatic Transmission Shipping to North American Dealers WENDELL, N.C. (May 5, 2020) — KIOTI Tractor, a division of Daedong-USA, Inc., delivers land owners a durable and KIOTI.

public void Print(DevExpress.XtraPrinting.IPrintable pGrid, string pTitle, System.Drawing.Printing.PaperKind pPaperKind, bool pLandscape)
{
Print(pGrid, pTitle, pPaperKind, pLandscape, 20);
}

public void Print(DevExpress.XtraPrinting.IPrintable pGrid, string pTitle, System.Drawing.Printing.PaperKind pPaperKind, bool pLandscape, float subHeight)
{
strTitle = pTitle;
PaperKind = pPaperKind;
_subHeight = subHeight;
PrintableComponentLink link = new PrintableComponentLink(new PrintingSystem());
link.PaperKind = PaperKind;
link.Landscape = pLandscape;
link.Margins.Top = 100;
link.Margins.Bottom = 60;
link.Margins.Left = 50;
link.Margins.Right = 50;
link.Component = pGrid;
link.CreateMarginalHeaderArea += new CreateAreaEventHandler(Link_CreateMarginalHeaderArea);
link.CreateMarginalFooterArea += new CreateAreaEventHandler(Link_CreateMarginalFooterArea);
link.CreateDocument();
link.ShowPreview();
//link.ShowRibbonPreview(DevExpress.LookAndFeel.UserLookAndFeel.Default);
}


private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
{
PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, strTitle, Color.DarkBlue, new RectangleF(0, 0, 110, 50), BorderSide.None);
brick.LineAlignment = BrickAlignment.Center;
brick.Font = new Font('굴림체', 18);
brick.Alignment = BrickAlignment.Center;
brick.AutoWidth = true;

PageInfoBrick Lbrick = e.Graph.DrawPageInfo(PageInfo.DateTime, ', Color.DarkBlue, new RectangleF(0, 0, 100, 20), BorderSide.None);
Lbrick.LineAlignment = BrickAlignment.Far;
Lbrick.Font = new Font('굴림체', 9);
Lbrick.Alignment = BrickAlignment.Far;
Lbrick.AutoWidth = true;

if (_subContent != ')
{
PageInfoBrick Sbrick = e.Graph.DrawPageInfo(PageInfo.DateTime, _subContent, Color.DarkBlue, new RectangleF(0, 0, 100, _subHeight), BorderSide.None);
Sbrick.LineAlignment = BrickAlignment.Far;
Sbrick.Font = new Font('굴림체', 9);
Sbrick.Alignment = BrickAlignment.Near;
Sbrick.AutoWidth = true;
}


}

private void Link_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e)
{
PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.None, CUser.Company, Color.DarkBlue, new RectangleF(0, 0, 100, 20), BorderSide.None);
brick.LineAlignment = BrickAlignment.Near;
brick.Font = new Font('굴림체', 9);
brick.Alignment = BrickAlignment.Center;
brick.AutoWidth = true;

PageInfoBrick Lbrick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, ', Color.DarkBlue, new RectangleF(0, 0, 100, 20), BorderSide.None);
Lbrick.LineAlignment = BrickAlignment.Near;
Lbrick.Font = new Font('굴림체', 9);
Lbrick.Alignment = BrickAlignment.Far;
Lbrick.AutoWidth = true;
}
#endregion

}
}

※ 클래스 호출

clsReport cReport = new clsReport();
cReport.subContent = '조회조건 : ' + dtpFrom.Value.ToString('yyyy-MM-dd') ;
cReport.Print(gridControl2, '보고서', System.Drawing.Printing.PaperKind.A4, true);

gridView1.Columns.Clear();
var db = new SysPosDataContext();
var q = from u in db.TBL_SiparisCaris where u.Tarih >= Convert.ToDateTime(dateEdit1.EditValue) && u.Tarih <= Convert.ToDateTime(dateEdit2.EditValue) select new { u.Tarih, u.Tutar, u.OdemeTipi };
gridControl1.DataSource=q.ToList();
gridView1.OptionsView.ShowFooter = true;
gridView1.Columns[1].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;

Devexpress Printablecomponentlink

Devexpress Printablecomponentlink Example


gridView1.Columns[1].SummaryItem.DisplayFormat = 'Top = {0:C2}';
GridGroupSummaryItem item1 = new GridGroupSummaryItem();
item1.FieldName = 'Tutar';
item1.SummaryType = DevExpress.Data.SummaryItemType.Sum;
item1.DisplayFormat = 'Toplam {0:c2}';
item1.ShowInGroupColumnFooter = gridView1.Columns['Tutar'];
gridView1.GroupSummary.Add(item1);
gridView1.BestFitColumns();



broken image