I'm a relative beginner with iReport. I've built a report with Parameters and they all work ok apart from the one in the ORDER BY clause which reads ORDER BY $P{pSequence} DESC, and more keys. If I include the parameter in the report body then I can see that it is being set correctly. If I edit its value into the SQL statement instead of using the Parameter substitution above, then I get the right results. However if I use the substitution above then the sequence does not come out as desired. I can't tell yet whether that part of the ORDER BY is being ignored or whether the entire ORDER BY clause is being ignored. No error is reported and the report is generated ok but not in the desired sequence. So given that the substitution is working in the report itself - I see the value printed out - and given that parameters used in the WHERE clause are working fine, why doesn't the parameter in the ORDER BY clause work? Any ideas? Or worked examples where it does work? Kind Regards Steve