[
https://issues.apache.org/jira/browse/FINERACT-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hysnije updated FINERACT-2622:
------------------------------
Attachment: image-2026-05-28-14-14-09-703.png
> Values not sorted correctly in report output
> --------------------------------------------
>
> Key: FINERACT-2622
> URL: https://issues.apache.org/jira/browse/FINERACT-2622
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Hysnije
> Priority: Major
> Attachments: image-2026-05-28-13-41-40-863.png,
> image-2026-05-28-14-14-09-703.png
>
>
> h3. Steps to reproduce
> # Navigate to *System* > *Admin* > *Manage Reports*
> # Create a report for any entity with an SQL script which contains an
> "{*}Order By{*}" statement, in my example I did a select on Loans with an
> order by on loan account number in descending direction ((i) can be a simple
> select)
> # Navigate to *Reports* and select the newly created report
> # Click "{*}Run Report"{*}
> h3. Actual result
> Loan account numbers are *not* displayed in correct descending numerical order
> !image-2026-05-28-13-41-40-863.png!
> h3. Expected result
> Loan account numbers should always be displayed in {*}correct descending
> order{*}, respecting the {{ORDER BY loan.account_no ASC}} SQL clause.
> h3. Additional information
> The issue is that the SQL is wrapped into a subselect
> [https://github.com/apache/fineract/blob/develop/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java#L202.|https://github.com/apache/fineract/blob/develop/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java#L202]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)