Hello,
I'm trying to sort a DataBand and then to select first 5 rows but all I'm getting is that Stimulsoft first selects those 5 rows and then sorts them, but I need the opposite of that: 1. To sort; 2. To Select first 5 rows;
Can you help me with that!
Sorting then filtering a databand
-
- Posts: 6
- Joined: Tue Jul 10, 2018 7:17 am
Re: Sorting then filtering a databand
Hello.
Unfortunately, the filtering works before the sorting.
You could stop showing the rows by calling the Last() method of the Data Source in the After Print event of the Data Band.
The Last() method moves a pointer to the last row of the Data Source and other rows will not be shown.
Your code should be like this:
Please, look at the attached report template.
Thank you.
Unfortunately, the filtering works before the sorting.
You could stop showing the rows by calling the Last() method of the Data Source in the After Print event of the Data Band.
The Last() method moves a pointer to the last row of the Data Source and other rows will not be shown.
Your code should be like this:
Code: Select all
if (Line == 5) Categories.Last();
Thank you.
- Attachments
-
- Last.mrt
- (7.73 KiB) Downloaded 173 times