Re: Order By DESC not working on iframe or report
Posted: Fri Mar 10, 2023 3:23 pm
Hi kev1n
Problem solved. Thanks again for your patience and support. Your first code recommendation was correct all along. I had commented out a bit of the SQL statement which I now realise you can't do within the SQL. I removed that bit and it now all works.
Working code:
I still can't get the report to list the data in descending order though. Every time I click on Group Properties and select DESC it reverts to ASC when I try to close it.
Problem solved. Thanks again for your patience and support. Your first code recommendation was correct all along. I had commented out a bit of the SQL statement which I now realise you can't do within the SQL. I removed that bit and it now all works.
Working code:
Code: Select all
WHERE (1 = 1)
" . $filter. " "
." ORDER BY
tblValues.SaleDate DESC ";