【发布时间】:2015-10-19 03:31:03
【问题描述】:
我正在使用 VB6 和 Crystal Report 8.5,我想直接使用默认打印机打印我的报表,无需预览并单击打印按钮。我有这段代码,但是当我尝试打印时,它会显示预览,我必须单击打印按钮才能进行打印 这是我的代码
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
【问题讨论】:
标签: printing crystal-reports vb6