一键直接打印而无需查看

2020-08-26 01:33发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)我没有打开任何直接在打印机上发送...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我没有打开任何直接在打印机上发送过的打印文档,而我已经应用了此打印。

将ConnectionInfo昏暗为ConnectionInfo =新的ConnectionInfo()
             CashReceipt昏暗为新ReportDocument()
             CashReceipt.Load(Application.StartupPath和" \ Reports \ Sale Reports \ CashReceipt.rpt")
             将MyTables视作表= CashReceipt.Database.Tables

             对于每个MyTable,作为MyTables中的CrystalDecisions.CrystalReports.Engine.Table
                 将MyTableLogonInfo昏暗为TableLogOnInfo = MyTable.LogOnInfo
                 ConnectionInfo.ServerName ="。\ SQLEXPRESS"
                 ConnectionInfo.DatabaseName ="发票"
                 ConnectionInfo.UserID =" sa"
                 ConnectionInfo.Password ="管理员"
                 ConnectionInfo.IntegratedSecurity = False
                 MyTableLogonInfo.ConnectionInfo =连接信息
                 MyTable.ApplyLogOnInfo(MyTableLogonInfo)
             下一个

             RPTfrmCashReport.CrystalReportViewer1.ReportSource = CashReceipt
             Dim mySelectionFormula As String =" {Invoice_Master.Invoice_no} ='"&FrmSalebill.LblInvoiceno.Text&"'

                 CashReceipt.RecordSelectionFormula = mySelectionFormula
                 CashReceipt.PrintToPrinter(1,False,0,0)