hey anybody know how to filter contents in ReportViewer during 'run-time'?
somebody told me to read this http://msdn.microsoft.com/en-us/library/ms252125%28v=vs.80%29.aspx
but this doesn't help at all because it filters
contents in design time. What I need is to filter contents in 'run-time'.
thanks in advance :?:

>What I need is to filter contents in 'run-time'.

set new data source.

Me.yourTableAdapter.Fill(Me.DataSet1.yourTable)
 Me.DataSet1.yourTable.DefaultView.RowFilter = "column_name='data'"
 yourBindingSource.DataSource = Me.DataSet1.yourTable.DefaultView
 Me.ReportViewer1.RefreshReport()

Hey sir I've tried your codes. Thanks!:)

Me.table1_1TableAdapter.Fill(Me.binfo_ds.table1_1)
Me.binfo_ds.table1_1.DefaultView.RowFilter = "FacultyID='123'"   
table1_1BindingSource.DataSource = Me.binfo_ds.table1_1.DefaultView
Me.ReportViewer1.RefreshReport()

I was just wondering if there's a way of getting the value
from a TextBox such as:

"FacultyID=TextBox1.Text"

instead of

"FacultyID='123'"

@adatapost
I think i have figured it out. Thanks for your help! :)

Me.table1_1TableAdapter.Fill(Me.binfo_ds.table1_1)
Me.binfo_ds.table1_1.DefaultView.RowFilter = "FacultyID = '" & TextBox1.Text & "'"
table1_1BindingSource.DataSource = Me.binfo_ds.table1_1.DefaultView
Me.ReportViewer1.RefreshReport()

how can that be grouped?
eg daily sales data grouped into monthly sales data.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.