Adding filter into a report

Top  Previous  Next

FastReport's dialogue designer has got very comfortable facilities for adding controls, which support the data filtering. For this, drag&drop the data column from the "Data" window onto the dialogue from. During this, FastReport creates the header (LabelControl control) and an actual control which will be used for data filtering:

 

dialogAddFilter

 

The control type depends on the type of the data column. If the column is of string type, then after inserting it, you will be offered to choose the control type:

 

dialogAddFilter1

 

If you have inserted two similar controls, connected to the same data column, FastReport automatically configures the data range with the help of the "FilterOperation" property. The first control will have FilterOperation = GreaterThanOrEqual, the second - LessThanOrEqual. This will be done in case, if you insert a column which is not of string type.

 

As such, for adding data filtering into any report, you need to do the following:

 

add a new dialogue into the report;
drop onto the dialogue a data column, on which you want to filter the report.