Dynamic sort
stefque
Serbia
Hi everybody,
I have a running desktop application with a lot of reports in FastReport. And users are asking if they could have a button that sorts the report by some column.
I would like to know if there is a dynamic way to sort a report when it's already been shown?
I could close the report, change the query to "sort by xxxx asc" for example and show it again, but, what if, let's say, MYDACQuery1 is a dataset in MasterData1, and there is field from MYDACQuery2 which refers to MYDACQuery1 as it' master data set, to be shown in MasterData1.
Could I make an already shown report to be sorted again by some button in my delphi application by choosing the column in a report?
I have a running desktop application with a lot of reports in FastReport. And users are asking if they could have a button that sorts the report by some column.
I would like to know if there is a dynamic way to sort a report when it's already been shown?
I could close the report, change the query to "sort by xxxx asc" for example and show it again, but, what if, let's say, MYDACQuery1 is a dataset in MasterData1, and there is field from MYDACQuery2 which refers to MYDACQuery1 as it' master data set, to be shown in MasterData1.
Could I make an already shown report to be sorted again by some button in my delphi application by choosing the column in a report?
Comments
You can use a SQL 'JOIN' to produce a flat view containing data from multiple table and sortable by any column. Master-detail must then be handled in the report using the groupheader/footer facility.