原創|其它|編輯:郝浩|2012-11-23 11:17:36.000|閱讀 2368 次
概述:本示例將展示如何使用XtraReport打印報表,并附上源代碼。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
本示例將展示如何使用XtraReport打印報表。直接上代碼。
C#
using System; using System.Windows.Forms; using DevExpress.XtraReports.UI; // ... private void button1_Click(object sender, EventArgs e) { // Create a report instance, assigned to a Print Tool. ReportPrintTool pt = new ReportPrintTool(new XtraReport1()); // Invoke the Print dialog. pt.PrintDialog(); // Send the report to the default printer. pt.Print(); // Send the report to the specified printer. pt.Print("myPrinter"); }
VB
Imports System Imports System.Windows.Forms Imports DevExpress.XtraReports.UI ' ... Private Sub button1_Click(ByVal sender As Object, _ ByVal e As EventArgs) Handles button1.Click ' Create a report instance, assigned to a Print Tool. Dim pt As New ReportPrintTool(New XtraReport1()) ' Invoke the Print dialog. pt.PrintDialog() ' Send the report to the default printer. pt.Print() ' Send the report to the specified printer. pt.Print("myPrinter") End Sub
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網