Sorting data in report designer
I'm asked to change an existing report in the report designer.
The task is to change the order of the shown data.
I have to change in the designer, because the data source is also used for other reports and other sorting.
where can I find samples, videos or documentation, to help me to solve this.
Comments
It depends on your report. There are no specific instructions.
I advise you to study User's Manual (.pdf): https://www.fast-report.com/en/download/public_files/44/
You can also read the articles: https://www.fast-report.com/en/blog/Designer/
And the video:
https://www.youtube.com/playlist?list=PL6gTDEj1vGyE9_DlSQdu0d5OmLsoCDIxs
https://www.youtube.com/playlist?list=PL6gTDEj1vGyGIKkSDGvoTqEQbrWu95-lx
In the report, there is a TableObject which got an event "ManualBuild" event, where some data is handled.
It is these data I want in an other sort order.
Is it possible to sort the data in the "Code" window of the report?
DataSourceBase rowDataElever = Report.GetDataSource("Prøvedata.Elever");
(I have embed a picture of the 'code' )
https://photos.app.goo.gl/7EHtKPoSoEDpeEA99
Yes, you have to change the order in the code for ManualBuild. Row Table1.PrintRow(2) prints the second row and fills it with data. You can change the output order here.
Is there any samples showing how to change the sort order in the 'code'?
As I said earlier - there is no specific template. It depends on your report and your code. You can try to understand the code or ask a friend programmer to help you.
If I could code this in visualStudio it was no problem solving this problem.
Now I have to do the sorting in FastReport Code window, where there are no help!
I have googled to similar questions in your forum, but I can see that they also got no useful help.
It looks like I have to change the order in the datasource before it get to FastReport - it's going to be on report one datasourse and no reuse of datasources!
Do you want to reorder the data in your DataSource?
I thought you were talking about the order of your rows in the table. Alternatively, you can load all your data not into a table, but into a variable, sort by the method you need, and then fill it with your code.
A simple way:
Use a DataBand, make it like a table, and use data sorting in a DataBand.
What should i do if i change my design to my report?
I don't understand what you mean.