原創(chuàng)|其它|編輯:郝浩|2012-11-23 11:17:36.000|閱讀 2368 次
概述:本示例將展示如何使用XtraReport打印報(bào)表,并附上源代碼。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
本示例將展示如何使用XtraReport打印報(bào)表。直接上代碼。
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
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)