Re: PDF - Sorting output [message #1680 is a reply to message #1678] |
Mon, 22 September 2008 05:02 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
There are three places where the SQL 'orderby' sequence can be defined:
(1) In the controller script.
(2) In the MNU_TASK details on the MENU database.
(3) Changed by the user at runtime with the hyperlinks above each column.
Anything defined in (1) or (2) becomes the default sort sequence for that task, but can be changed by the user with option (3). The default is reinstated whenever the RESET button is pressed. Option (3) is only used when specifically requested by the user.
By default the OUTPUT1/2/3 patterns, which must always be called from a parent task, will use the same selection criteria and sort sequence as the parent task. If you have a hard-coded value in the controller script then this will be overwritten by any values passed down from the parent task. If you would like to change this behaviour then put the following code in the _cm_pre_getData() method of the relevant object:
if (!empty($GLOBALS['sql_oderby'])) {
$this->sql_orderby = $GLOBALS['sql_oderby'];
} // if
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|