我知道如何获取终端令牌的名称。图终端令牌名称,terminal_token = name[terminal_index[token_kind]]
。
如何使用non_terminal_index计算非终结名称。
我需要一些帮助。
答案 0 :(得分:2)
我想我喜欢这里的答案generateParser. 我认为答案是
Sub printreceipt()
Try
Dim da As New SqlDataAdapter
Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
sql = "SELECT BillNo,ItemName,ItemRate,ItemQty,Amount,GstAmount,TotalAmount,Dic,Discount,RoundOff,Svalue,Zvalue,RoundTotal,Given,Balance,Service FROM SalesItem where BillNo= " & Val(Me.txt_billno.Text) & " and EntryDate= '" & Format(Me.Str_Date.Value, "yyyy-MM-dd") & "' "
' Dim rep As SalesBill1 = New SalesBill1()
Dim rep As CrystalReport4 = New CrystalReport4()
Dim cmd As New SqlClient.SqlCommand(sql, con)
da.SelectCommand = cmd
Dim ds As New DataSet
da.Fill(ds, "SalesItem")
Dim dt As New DataTable
dt = ds.Tables("SalesItem")
rep.SetDataSource(dt)
Dim settings = New PrinterSettings()
Dim a As String = settings.PrinterName
Form1.CrystalReportViewer1.ReportSource = rep
rep.PrintOptions.PrinterName = a
rep.PrintToPrinter(1, False, 0, 0)
rep.Close()
rep.Dispose()
Form1.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub