logo
small logo
  • Products
  • Comprar
  • Suporte
  • Articles
  • Customer panel Suporte
    • en
    • ru
    • pt
    • es
    • de
    • pl
    • JP
    • ZH
  • Home
  • /
  • Articles
  • /
  • How to sort the data in the report FastReport.Net
  • How to export several reports into one PDF file

    8 de janeiro de 2020

    The theme for this article was one of the questions users of the generator List

    read more
  • How to display the footer page PageFooter only on the last page of the report

    15 de maio de 2020

    When you develop the same reports, or reports with the same bands, you can use

    read more
  • How to insert a report into the body of a email

    9 de julho de 2020

    By default, FastReport.Net allows you to send e-mails with an attached report file in one

    read more
  • How to display a sub-report based on conditions of the parent report

    8 de janeiro de 2020

    Many modern report generators allow you to embed another report, the so-called sub-report. Why would

    read more
  • How to create a custom toolbar for web FastReport.NET report

    31 de maio de 2020

    Many users of report generators are interested in setting up the toolbar when reviewing the

    read more

How to sort the data in the report FastReport.Net

22 de abril de 2020

Sorting data is one of the most important data processing tools. We can say, it is the basis of the analysis. Analysing chaotic output data is almost impossible. Therefore, sorting provides all the tools that work with data. This also applies to reporting tools. After all, the data source may provide the report data is not sorted, or sorted, but not in the required field, not in the order.

The documentation for FastReport.Net outlines two ways to sort: sorting group values, sorting data in the Data band.

The first type of sorting is available to us when we create a group, namely when setting up the Group Headline band. When you choose the field you're going to group on, you can sort it right away.

 

There are three sorting options available: no sorting, ascending, descending.

But if we talk about sorting basic data in the data bin, we can access more advanced sorting - three fields at once, and for each of them you can choose the order of sorting.

To call a sorting editor, you need to click the band's header twice on the page template.

 

Despite the user-friendly interface, this tool has one significant drawback. To be precise it can sort only three fields. However, some of the tables have a variety of fields, and you may need to sort by more than 3 fields.

You can bypass this restriction by sorting the data in the source using the query. You can do this either by creating a data source or by a source you've already created, directly for the desired table.

In the first case, we're just writing a request to get the data in the right order. The second case is the same, but in a data source that has already been created.

In the data tree, choose the right table. In the property inspector, we ask SelectCommand.

 

It is alled by the wizard to create an SQL query. You can enter a query manually or use the Query Builder. So you can sort of arbitrary number of fields:

1
SELECT * FROM customer ORDER BY Country, City, State, CustNo, Company

 When you create a data source, you may not be aware that you need a certain order data. But you can always add a request in an existing data source. However, this method does not work with non-SQL databases.

about product download comprar
avatar
Dmitriy Fedyashov
.NET FastReport
Comments
Axit Systems
55 days ago
Nice feature, but, as we use FastReport 6 for VCL, is it avalaible or planned for it ?

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
  • Comprar
  • Download
  • Documentação
  • Depoimentos
  • Como desinstalar nossos produtos
  • Ticket system
  • FAQ
  • Tutorial Video
  • Forum
  • Articles
  • Our News
  • Informação sobre nós
  • Parceiros
  • Nossa equipe
  • Contatos

© 1998-2021 by Fast Reports Inc.

  • Privacidade