rdlc 过滤中的特殊字符

时间:2021-05-17 08:06:02

标签: vb.net reporting-services rdlc

我在过滤 rdlc 中的特殊字符时遇到了这个问题,但是当我在 datagridview 中使用此代码时,它运行没有错误。

    Me.StockcardMaterialTableAdapter.Fill( Me.aldrichDataSet28.StockcardMaterial)
    
    Dim Tarantado As New ReportParameter("GAGO", YY.Value)

    Try
        If Not String.IsNullOrEmpty(TextBox1.Text) Then
            Dim keyword As String = TextBox1.Text.Trim()
            StockcardMaterialBindingSource.Filter =
     "(ProductName  LIKE '%" & keyword & "%')"


            ReportViewer1.LocalReport.SetParameters(New ReportParameter() {Tarantado})
            ReportViewer1.RefreshReport()


        ElseIf TextBox1.text = Nothing Then

            StockcardMaterialBindingSource.RemoveFilter()
            ReportViewer1.RefreshReport()

        End If
    Catch ex As Exception
        MessageBox.Show("Error: " + ex.Message.ToString(),
      "Error Handler - Code A Minute.",
    MessageBoxButtons.OK, MessageBoxIcon.Information)
    Finally
        TextBox1.Focus()

    End Try
    txtmonth.Text = ""
    txtTin.Text = ""
    txtQuarter.Text = ""

enter image description here

0 个答案:

没有答案