Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » PDF List sort order
Re: PDF List sort order [message #2334 is a reply to message #2330] Tue, 03 November 2009 09:00 Go to previous messageGo to previous message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Sorry, I have made a mistake with the post below. I have posted the ORDER BY from the wrong place. The actual order elements are coming from the parent task as you described, However, the asc / desc problem is documented correctly.

-------------

I've done some tests and I think there is something more going on with this. By logging the SQL queries I can see what ORDER BY statement is being generated:

On initial entry to the list screen the order by clause is being taken from that in the task definition - the ASC is being added by the framework:

ORDER BY branch.branch_id, branch.syllabus_type_id, grade.seq, exam.related_exam_id, exam.related_exam_seq, candidate.last_name, candidate.first_name asc  LIMIT 10 OFFSET 0 =>Count=35


When I run the PDF output (a navigation button from the list task) the first time it uses the order defined in the task definition, again with ASC appended by the framework:

ORDER BY exam.branch_id, exam.syllabus_type_id, exam.related_exam_id, exam.related_exam_seq, candidate.last_name, candidate.first_name asc =>Count=35


On clicking RESET, the query generated for the list task is identical to previous as expected. The order for the PDF output task is also the same, except that now the framework has appended DESC to the query instead, thus reversing the order:

ORDER BY exam.branch_id, exam.syllabus_type_id, exam.related_exam_id, exam.related_exam_seq, candidate.last_name, candidate.first_name desc =>Count=35


Something in the RESET operation is causing the sort to change from asc to desc.

[Updated on: Tue, 03 November 2009 09:10]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Maximum Query Execution Time
Next Topic: Export Templated Task
Goto Forum:
  


Current Time: Mon Nov 25 04:59:58 EST 2024

Total time taken to generate the page: 0.00943 seconds