I'm running iReport 3.7.1 and MySQL 5.1. I'm attempting to have the sort order set based on a parameter but can't get it to work. I've tried these 3 methods: 1) Use the parameter name in the ORDER BY clause. 2) Add the parameter to the SELECT clause with an alias and reference the alias in the ORDER BY clause. 3) Same as 2, but reference the alias in the Sort order (memory sort) dialog. In each case the report runs, but the records appear in the same order as if there were no ORDER BY or Sort order specified. If I paste the query for method 2 directly in the MySQL Query Browser or OpenOffice it does work properly. Any ideas?