I have Windows Forms Application (VS-2008) with Access database, and I'm using MicrosoftReportViewer. My problem is how to set filter to report. Something like: Column1.Value=textBox1.Text, and Column2.Value between dateTimePicker1 and dateTimePicker2 selected values. I don't know how to write filter/expression for that cases.
Please, help me.
Loading
Master BillaPosted Oct 31, 2009, 10:45 PM
You need follow up this steps
To add a filter to a data region
Open the client report definition (.rdlc) file in graphical design mode.
Select the data region on which you want to define the filter. If the data region is a table or matrix, click the table or matrix so that column and row handles appear above and next to the table or matrix.
Right-click the corner handle of the table or matrix, or anywhere within the list or chart, and then click Properties.
On the Filters tab, for Filter, do the following:
In Expression, type or select the expression that you want the filter to evaluate.
In Operator, select the operator that you want the filter to use to compare the evaluated field and the value.
In Value, type the expression or value against which you want the filter to evaluate the value in Expression.
To add a filter to a table group or matrix group
Click the table or matrix so that column and row handles appear above and next to the table or matrix.
Right-click the corner handle of the table or matrix and then click Properties.
On the Groups tab, select the group to edit, and then click Edit.
On the Filters tab, for Filter, do the following:
In Expression, type or select the expression for the field that you want the filter to evaluate.
In Operator, select the operator that you want the filter to use to compare the evaluated field and the value.
In Value, type the expression or value against which you want the filter to evaluate the value in Expression.
To add a filter to a list group
Right-click the list and then click Properties.
On the General tab, click Edit details group.
On the Filters tab, for Filter, do the following:
In Expression, type or select the expression for the field that you want the filter to evaluate.
In Operator, select the operator that you want the filter to use to compare the evaluated field and the value.
In Value, type the expression or value against which you want the filter to evaluate the value in Expression.
To add a filter to chart groups
-
-
-
http://msdn.microsoft.com/en-us/library/ms252125(VS.80).aspxRight-click the chart and then click Properties.
On the Data tab, select a category group or a series group and then click Edit.
On the Filters tab, for Filter, do the following:
-
-
-
more detailsIn Expression, type or select the expression for the field that you want the filter to evaluate.
In Operator, select the operator that you want the filter to use to compare the evaluated field and the value.
In Value, type the expression or value against which you want the filter to evaluate the value in Expression.
If it's help, Please mark as answer
Thank you
Miodrag GrahovacPosted Nov 1, 2009, 3:56 AM
"In Expression, type or select the expression for the field that you want the filter to evaluate."
Could you, please, explain me how can I set expression as textBox where user can type values?
When I type in filter list: =Fields!col2.Value = xyz it's o.k., but, I'd like to use something like: =Fields!col2.Value =textBox1.Text
Is that possible?