哪里出错?我不能不看(BillNo)

时间:2017-07-23 08:14:26

标签: sql-server vb.net crystal-reports

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

照片错误:

enter image description here

1 个答案:

答案 0 :(得分:0)

尝试从选择公式中删除单引号。这就像是:

CrystalReportViewer1.SelectionFormula = " {TbOrderMedicine.orderId}=" & orderId