logo
small logo
  • Produkty
  • Zamów
  • Wsparcie techniczne
  • Articles
  • Customer panel Wsparcie techniczne
    • en
    • pt
    • es
    • de
    • pl
    • JP
    • ZH
  • Glówna strona
  • /
  • Articles
  • /
  • How to filter data by date in the report using the dialogue form
  • Jak utworzyć interaktywny raport z opcją sortowania za pomocą przełączników?

    2 czerwca 2021

    Od czasu do czasu nasi użytkownicy stają przed zadaniem wykonania interaktywnego raportu. Może to

    read more
  • Jak wykonać sortowanie od końca do końca podobnych macierzy na kilku stronach w FastReport .NET

    22 września 2021

    Załóżmy, że mamy zadanie: posortować macierz na pierwszej stronie w odpowiedniej kolejności. Możesz również potrzebować

    read more
  • Zdarzenia PreviewControl.OnPrint i PreviewControl.OnExport

    1 października 2020

    W FastReport 2019.4 dodano możliwość przepisania zdarzeń PreviewControl.OnPrint i PreviewControl.OnExport, wywoływanie których następuję bezpośrednio po

    read more
  • Format MS Word vs. Open Document Text. Który jest lepszy?

    19 października 2020

    Mówiąc o edytorach tekstu, od razu przedstawiamy koryfeusza w postaci programu Microsoft Word, który od

    read more
  • Podłączanie do Elasticsearch

    10 listopada 2021

    Teraz produkty FastReport .NET, Core, Mono i OpenSource umożliwiają łączenie się z Elasticsearch. Elasticsearch to

    read more

How to filter data by date in the report using the dialogue form

16 listopada 2019

The dialogue forms in a report are mainly needed to filter the data. As a rule, controls are placed on the form, with the help of which values are set. Then, these values are used to further filter the data. But most of the controls allow you to filter the data directly. That is, they can be linked to a data source using the properties of the DataColumn. The control value will be used for filtering. Also, there is another feature that sets the very condition of comparing the value of the control data - FilterOperation. This feature allows you to compare for equality, more, less, and a combination of these options.
Often, we want to filter data by date. Moreover, people usually filter by a date range.
Let's look at an example of creating a report with a similar filtration. Add a dialog form to the report:

 

On the form we will place two control elements DateTimePicker . First one is needed to set the beginning of a date range, second one – for the end.

Let’s configure the properties of the first object DateTimePicker:

 

Here we set the Value property to set the beginning of the range by default. DateColumn property is set on the field OrderDate of the Orders table. A filter condition is GreaterThanOrEqual. This means that the date range will start with the control indicated date.
For the second DateTimePicker field, we set the following properties:

 

The default value remain unchanged - the current date. DataColumn property is the same as in the first DateTimePicker. A filter condition - LessThanOrEqual, that is less than or equal to the specified date.
The report template may contain the above to filter the field, maybe not - it does not matter.

Even before the construction of the report data will be filtered according to a specified date range:

 

As a result, we will get the report containing only needed information:

 As you can see, creating a filter in the dialogue form - it is one-minute task. It is enough to select the field in the data source and the filtering condition. Only two properties to set - and you have reached your goals.

about product pobierz zamów
avatar
Dmitriy Fedyashov
Technical Writer
Fast Reports Team: Dmitriy Fedyashov - Technical Writer at Fast Reports
.NET FastReport Filtering

Add comment
logo
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314
  • Zamów
  • Pobierz
  • Dokumentacja
  • Opinie użytkowników
  • Jak odinstalować nasze produkty
  • Ticket system
  • FAQ
  • Tutorial Video
  • Forum
  • Articles
  • Our News
  • Prasa o nas
  • Partnerzy
  • Extended licensing
  • Kontakty

© 1998-2022 by Fast Reports Inc.

  • Poufność