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

Home » RADICORE » How To » PDF - Sorting output
PDF - Sorting output [message #1676] Sun, 21 September 2008 12:34 Go to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
The $sql_orderby clause in the task.php script for a PDF list view does not seem to be taken into account. The report is being sorted by the default sort order of the class.

Is there something else specific that needs to be done?
Re: PDF - Sorting output [message #1677 is a reply to message #1676] Sun, 21 September 2008 12:36 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
It uses the same sort order and search criteria as the LIST1 screen from which it is run.

Re: PDF - Sorting output [message #1678 is a reply to message #1676] Mon, 22 September 2008 04:16 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Is it possible somehow to override this sort sequence.

I wanted to be able to produce a couple of different reports from the same LIST1 screen that would need to be sorted in a different order.

I originally expected the $sql_orderby in the main calling output2 script to do this but you are confirming that this is not the case.
Re: PDF - Sorting output [message #1680 is a reply to message #1678] Mon, 22 September 2008 05:02 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
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


Re: PDF - Sorting output [message #1681 is a reply to message #1676] Mon, 22 September 2008 05:27 Go to previous message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Thanks - works perfectly!
Previous Topic: Transaction Pattern Advice
Next Topic: Change password at first login
Goto Forum:
  


Current Time: Thu Apr 18 03:16:05 EDT 2024

Total time taken to generate the page: 0.01061 seconds