作成日: 2018/04/26 最終更新日: 2018/04/26
文書種別
使用方法
詳細
System.Printing.PrintQueueおよびSystem.Printing.PrintTicketの各プロパティを設定し、Printメソッドの引数に渡します。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
C1FlexReport1.Load("reportFile", "reportName")
' 印刷設定用オブジェクト
Dim po As New C1.WPF.Document.C1PrintOptions
' 出力先プリンタ
Dim lps As New System.Printing.LocalPrintServer
po.PrintQueue = lps.GetPrintQueue("PrinterName")
po.PrintTicket = po.PrintQueue.DefaultPrintTicket
' 印刷部数
po.PrintTicket.CopyCount = 5
' 両面印刷
po.PrintTicket.Duplexing = Printing.Duplexing.TwoSidedLongEdge
' カラー印刷
po.PrintTicket.OutputColor = Printing.OutputColor.Color
' 印刷
C1FlexReport1.Render()
C1FlexReport1.Print(po)
' 印刷設定用オブジェクト
Dim po As New C1.WPF.Document.C1PrintOptions
' 出力先プリンタ
Dim lps As New System.Printing.LocalPrintServer
po.PrintQueue = lps.GetPrintQueue("PrinterName")
po.PrintTicket = po.PrintQueue.DefaultPrintTicket
' 印刷部数
po.PrintTicket.CopyCount = 5
' 両面印刷
po.PrintTicket.Duplexing = Printing.Duplexing.TwoSidedLongEdge
' カラー印刷
po.PrintTicket.OutputColor = Printing.OutputColor.Color
' 印刷
C1FlexReport1.Render()
C1FlexReport1.Print(po)
◎サンプルコード(C#)
c1FlexReport1.Load(@"reportFile", "reportName");
// 印刷設定用オブジェクト
var po = new C1.WPF.Document.C1PrintOptions();
// 出力先プリンタ
var lps = new System.Printing.LocalPrintServer();
po.PrintQueue = lps.GetPrintQueue("PrinterName");
po.PrintTicket = po.PrintQueue.DefaultPrintTicket;
// 印刷部数
po.PrintTicket.CopyCount = 5;
// 両面印刷
po.PrintTicket.Duplexing = System.Printing.Duplexing.TwoSidedLongEdge;
// カラー印刷
po.PrintTicket.OutputColor = System.Printing.OutputColor.Color;
// 印刷
c1FlexReport1.Render();
c1FlexReport1.Print(po);
// 印刷設定用オブジェクト
var po = new C1.WPF.Document.C1PrintOptions();
// 出力先プリンタ
var lps = new System.Printing.LocalPrintServer();
po.PrintQueue = lps.GetPrintQueue("PrinterName");
po.PrintTicket = po.PrintQueue.DefaultPrintTicket;
// 印刷部数
po.PrintTicket.CopyCount = 5;
// 両面印刷
po.PrintTicket.Duplexing = System.Printing.Duplexing.TwoSidedLongEdge;
// カラー印刷
po.PrintTicket.OutputColor = System.Printing.OutputColor.Color;
// 印刷
c1FlexReport1.Render();
c1FlexReport1.Print(po);
関連情報
旧文書番号
82638