1
我正在使用VB6和水晶報告8.5,我想用默認打印機直接打印我的報告,無需預覽,然後單擊打印按鈕。我有這樣的代碼和,但是當過我嘗試打印它讓我看到預覽和我必須點擊打印按鈕打印過程 這裏是我的代碼vb6打印水晶報告沒有預覽和點擊打印按鈕
With MAIN.CR
.Reset: MAIN.InitCrys
.ReportFileName = App.Path & "\Reports\rptCashInvoice.rpt"
.Connect = "POS"
strTitle = "Cash Invoice"
strSelFormula = "{Cash_Sales.InvoiceNo} ='" & InvoiceNo & "'"
.SelectionFormula = strSelFormula
.WindowTitle = strTitle
.ParameterFields(0) = "prmCompany;" & CurrBiz.BUSINESS_NAME & ";True"
.ParameterFields(1) = "prmAddress;" & CurrBiz.BUSINESS_ADDRESS & ";True"
.ParameterFields(2) = "prmContactInfo;" & CurrBiz.BUSINESS_CONTACT_INFO & ";True"
.PrintReport
.DiscardSavedData = True
End With