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