how to filter Data set ,I want only to retrieve is "REPAIRED " , and filter by between date.
using report viewer
and this is my query for Dataset job_order query
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
答案 0 :(得分:0)
使用数据集中的查询进行过滤
转到您的数据集右键单击添加查询
添加此查询
SELECT * FROM job_order WHERE COLUMN LIKE 'YOUR WORD'