,Vb.net RDLC由Word过滤
问题描述:
如何过滤数据集,我只想检索是“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
答
数据集中的
使用查询过滤去你的数据集右键点击添加查询
添加此查询
SELECT * FROM job_order WHERE COLUMN LIKE 'YOUR WORD'
感谢主席先生。一个想法,我使用配置 –