frm1中的代码, 这是orderId的create sub 在TbOrderMedicine col orderId
Sub New(ByVal orderId)
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
CrystalReportViewer1.SelectionFormula = " {TbOrderMedicine.orderId}='" & orderId & "' "
CrystalReportViewer1.RefreshReport()
End Sub
btn打印机BillN中的代码
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Frm1 As New Form1(lbserviceid.Text)
Frm1.Show()
End Sub
照片错误:
答案 0 :(得分:0)
尝试从选择公式中删除单引号。这就像是:
CrystalReportViewer1.SelectionFormula = " {TbOrderMedicine.orderId}=" & orderId