0
如何在沒有預覽的情況下打印報告並採用默認的本地打印機? 我嘗試把這個代碼行,但一點兒也不工作:打印報告時沒有預覽視圖,也沒有預覽瀏覽器視圖
Dim rep As New XtraReport1()
rep.DataSource = DataSet
rep.CreateDocument()
rep.Print()
謝謝
如何在沒有預覽的情況下打印報告並採用默認的本地打印機? 我嘗試把這個代碼行,但一點兒也不工作:打印報告時沒有預覽視圖,也沒有預覽瀏覽器視圖
Dim rep As New XtraReport1()
rep.DataSource = DataSet
rep.CreateDocument()
rep.Print()
謝謝
我解決我的問題與此代碼:[DevExpress的XtraReporty的
Imports DevExpress.XtraReports.UI
Imports System.IO
Imports DevExpress.XtraPrinting
Imports System.Data
Imports System.Drawing
Partial Class TPV_Tickets
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim Report As New TicketTPV
' THIS IS TO TAKE THE DEFAULT LOCAL PRINT
Dim instance As New Printing.PrinterSettings
Dim DefaultPrinter As String = instance.PrinterName
' THIS IS TO PRINT THE REPORT
Report.PrinterName = DefaultPrinter
Report.CreateDocument()
Report.PrintingSystem.ShowMarginsWarning = False
Report.Print()
End Sub
End Class
可能重複打印沒有任何UI交互](http://stackoverflow.com/questions/4660178/devexpress-xtrareporty-print-without-any-ui-interaction) –
你好,你鏈接的問題不完全是我需要的,它的不工作我的代碼,但謝謝你。 –