2017-08-13 53 views
0

如何過濾數據集,我只想檢索是「REPAIRED」,並按日期過濾。,Vb.net RDLC由Word過濾

使用報表查看器

,這是我的數據集job_order查詢查詢

SELECT  ID, cust_jo, cust_name, cust_num, cust_brand, cust_model, cust_imeiserial, cust_problem, cust_entrust, cust_repaircost, cust_downpayment, cust_balance,      tech_remarks, cust_reciveperson, jo_statusdate_added, date_modified, releasedby, releasedate FROM job_order WHERE (jo_status LIKE 'REPAIRED') 




    Public Property strReport As String 
Private Sub ReportView_Load(sender As Object, e As EventArgs) Handles MyBase.Load 
    'TODO: This line of code loads data into the 'DBDataSet.job_order' table. You can move, or remove it, as needed. 
    Me.job_orderTableAdapter.Fill(Me.DBDataSet.job_order) 
    Dim rptDataSource As ReportDataSource 

    Try 
     With Me.ReportViewer1.LocalReport 
      .ReportPath = "D:\VBProjects\Sales Inventory\Sales Inventory\Report\Report1.rdlc" 
      .DataSources.Clear() 
     End With 
     Dim ds As New Sales_Inventory.DBDataSet 
     Dim da As New Sales_Inventory.DBDataSetTableAdapters.job_orderTableAdapter 

     da.Fill(ds.job_order) 


     rptDataSource = New ReportDataSource("DataReport", ds.Tables("job_order")) 
     Me.ReportViewer1.LocalReport.DataSources.Add(rptDataSource) 

     Me.ReportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout) 
    Catch ex As Exception 
     MessageBox.Show(ex.Message, My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Error) 
    End Try 


    Me.ReportViewer1.RefreshReport() 
    Me.ReportViewer1.RefreshReport() 
End Sub 

REPORT SAMPLE

回答

0

數據集中的

使用查詢過濾去你的數據集右鍵點擊添加查詢

添加此查詢

SELECT * FROM job_order WHERE COLUMN LIKE 'YOUR WORD' 
+0

感謝主席先生。一個想法,我使用配置 –