TableView initial sort

Hi,
I want to have an initial sort of a table and it should be done by the server. I know I could do it by application, but this is just a question if it is possible.
I found for the htmlb:tableViewColumn the attribute preSelectedSortDirection = "DESCENDING". But it seems that it is just showing the sort direction....
My tableView look like this one:
<htmlb:tableView id = "time"
              table = "//model/tab_time"
     emptyTableText = "do data"
      selectionMode = "<%= selectionmode %>"
    fillUpEmptyRows = "TRUE"
               sort = "SERVER"
    visibleRowCount = "3"
              width = "100%" >
    <htmlb:tableViewColumns>
      <htmlb:tableViewColumn columnName = "personid"
                             title      = "person"
                             sort       = "TRUE" />
      <htmlb:tableViewColumn columnName = "time"
                             title      = "time"
                             edit       = "TRUE" />
      <htmlb:tableViewColumn columnName = "wdate"
                             title      = "date"
                             edit = "TRUE"
                             sort = "TRUE"
         preSelectedSortDirection = "DESCENDING" />
      <htmlb:tableViewColumn columnName = "shortcomment"
                             title      = "comment"
                             edit       = "TRUE"
                             sort       = "TRUE" />
    </htmlb:tableViewColumns>
  </htmlb:tableView>
Thanks for help,
Stefan Huemer

my guess is that <b>preSelectedSortDirection</b> is only to mark the right icon.
lets take a case.
you sort the itab ascending and pass it to htmlb:tableView without using <b>preSelectedSortDirection</b> in column definition. in this case though the sorting is in ascending order the icons in the table header wont tell whether the current situation is ascending sort to descending sort.
so the way to use it
if you sort the itab passed to htmlb:tableview in ascending order by column a and b initially then set <b>preSelectedSortDirection</b> to 'ASCENDING'  to column a and b .
if you sort the itab passed to htmlb:tableview in descending order by column a and b initially then set <b>preSelectedSortDirection</b> to 'DESCENDING'  to column a and b .
if you have not sorted the itab passed to htmlb:tableView then dont set anything for <b>preSelectedSortDirection</b>
Regards
Raja

Similar Messages

  • How to show values with initial sort asc/desc in 11.5.10 iProcurement page?

    (Logged Bug 12902576 with OAFramework DEV, but OAF DEV closed the bug and advised to log the issue here in the forum)
    How to have values sorted in ascending order when user first navigates to the page?
    Currently the values are unsorted, and are only sorted after the user clicks the column heading to sort the values. We expect the users should not have to click the column heading, but instead that the values should be sorted in ascending order when the user navigates to the page. This issue occurs on an OAFramework based page in iProcurement application.
    PROBLEM STATEMENT
    =================
    Receipts and Invoices are not sorted in iProcurement Lifecycle page even after implementing personalization to sort ascending on Receipt Number and Invoice Number. Users expect the receipts and invoices to be sorted but they are not sorted.
    STEPS TO REPRODUCE
    1. Navigate to iProcurement
    2. Click the Requisitions tab
    3. Search and find a requisition line that is associated to a Purchase Order having multiple receipts and multiple invoices.
    4. Click the Details icon to view the lifecycle page where the receipts and invoices are listed
    - see that the receipts are not sorted, and the invoices are not sorted
    5. Implement personalization to sort in ascending order for Receipt Number and for Invoice Number. Apply the personalization and return to page.
    - the receipts and invoices are still not sorted.
    IMPACT
    Users need the receipts and invoices sorted to make it easier to review the data. As a workaround, click the column heading to sort the results
    Tried workaround suggested by OAFramework DEV in Bug 12902576 but this did not help.
    TESTCASE of suggested workaround
    NAVIGATION in visprc01
    1. Login: dfelton / welcome
    2. iProcurement responsibility / iProcurement Home Page / Requisitions tab
    3. Click the Search button in the upper right
    4. Specify search criteria
    - Remove the 'Created by' value
    - Change 'Last 7 Days' to 'Anytime'
    - Type Requisition = 2206
    5. Click Go to execute the search
    6. Click the Requisition 2206 number link
    7. Click the Details icon
    8. In the Receipt section, click the link 'Personalize Table: (ReceivingTableRN)'
    9. Click the Personalize (pencil) icon
    10. Click the Query icon for Site level (looks different than the screenshots from OAFramework team, because this is 11.5.10 rather than R12
    - Compare this to the Table personalization page show in the reference provided by OAFramework team -
    http://www-apps.us.oracle.com/fwk/fwksite/jdev/doc/devguide/persguide/T401443T401450.htm#cust_persadmin_editperprop
    11. See on the Create Query page
    Sorting
    No sorting is allowed
    The Query Row option becomes available in personalize after setting the Receipt Number row to Searchable. However, even after clicking the Query icon to personalize, it is not possible to specify sorting. There is a Sorting heading section on the personalization page, but there is also a statement: No sorting is allowed
    The workaround mentioned by OAFramework team in Bug 12902576 does not work for this case
    - maybe because this is 11.5.10 rather than R12?
    - maybe similar to Bug 8351696, this requires extension implementation?
    What is the purpose of offering ascending/descending for Sort Allowed if it does not work?
    Please advise if there is a way to have the initial sort in ascending order for this page.

    I´m sorry that you couldn´t reproduce the problem.
    To be clear:
    It´s not about which symbol should seperate the integer part from the fraction.
    The problem is, that i can´t hide the fraction in bargraph.
    The data im showing are integers but the adf bar graph component wants to show at least 4 digits.
    As I´m from germany my locale should be "de" but it should matter in the test case.
    You can download my test case from google drive:
    https://docs.google.com/open?id=0B5xsRfHLScFEMWhUNTJsMzNNUDQ]
    If there are problems with the download please send me an e-mail: [email protected]
    I uploaded another screenshot to show the problem more clear:
    http://s8.postimage.org/6hu2ljymt/otn_hide_fraction.jpg
    Edited by: ckunzmann on Oct 26, 2012 8:43 AM

  • To change the initial sorting property

    hi
    In my km portal the contents (content administration ->km content) initially they are displaying in the alphabatical order, i want to change that,ie i want to see the contents in the modified date's order.
    So pls help me where i should have to make this changes ... iam beginner in km area so pls help me ..and this is urgently needed..... surely give points to helpful answers.

    Hi,
    The collection renderer you are using has a property called Property for Sorting which Specifies the initial sort property.
    [http://help.sap.com/saphelp_nw04s/helpdata/en/87/3d48475ee8bd448c4031aa98d90524/frameset.htm]
    In your example, If you're using the standard layoutset for KM Content, go to System Administration -> System Configuration -> Knowledge Management -> Content Management -> User Interface -> Settings ->
    Collection Renderer Settings
    -> Collection List Renderer Settings -> AdminCollectionListRenderer. Find  Property for Sorting and change it from rnd:displayname to rnd:modified.
    Best regards,
    Avishai Zamir

  • Report not initially sorted as defined by Report Attributes "Sort Sequence"

    I have a Report Region with Type SQL Query and Source "SELECT * FROM <table>" where <table> has a primary key from a sequence. Under Report Attributes, I have Report Column "ST_NM" with Show and Sort checked and having a Sort Sequence of "1". I assume this is to set the iniital display sequence but regardless, the report rows display in Primary key order initially.
    To try it: http://apex.oracle.com/pls/apex/f?p=21997:2 with Dever/Ima9Dever
    1) How do I set the initial display sequence to be other than the primary key sequence?
    [Note: It seems to work part (or all?) of the time under our 4.1 implementation.]
    Thanks,
    Howard
    I thought this one would be easy!

    Howard (DBA in Training) wrote:
    I have a Report Region with Type SQL Query and Source "SELECT * FROM <table>" where <table> has a primary key from a sequence. Under Report Attributes, I have Report Column "ST_NM" with Show and Sort checked and having a Sort Sequence of "1". I assume this is to set the iniital display sequence but regardless, the report rows display in Primary key order initially.
    To try it: http://apex.oracle.com/pls/apex/f?p=21997:2 with Dever/Ima9Dever
    1) How do I set the initial display sequence to be other than the primary key sequence?
    [Note: It seems to work part (or all?) of the time under our 4.1 implementation.]Standard reports store sort columns persistently across sessions as user preferences. It's likely that Dever user has at some point clicked to sort on the PK column and created a persistent preference. Try it with a new user that has never viewed the page before...
    See +{thread:id=2433320}+ for more on this, including how to reset it.

  • Default initial sorting within report

    Hi, dear Apex-Insiders,
    One page of my application contains a report that is selecting all from a table.
    I do allow that the results may be orderer on any column.
    Nevertheless, by calling this page from another page I always want the same initial order. But application express remembers the settings of the call before.
    Is it possible to suppress this behaviour ? And how to manage this ?
    Thanks in advance,
    Hergen.

    Hi Rob,
    I did not completeley understand the advice given in that thread.
    But it brought mo to the following idea:
    Create Process as:
    Process Point: On load - Before Header
    Run Process: Once Per Page Visit
    Process: RESET_USER_PREFERENCES.
    That is not 100% what I wanted, but very close to it.
    Whenever this page is invoked from another page the sorting is at the default.
    It is also at the default when I submit a procedure at the same page (which I did not want, but can accept).
    Thank you for your help,
    Hergen.

  • Summary row in tableview (including sorting and BYPAGE navigation)

    Hello everybody,
    I already found a few topics dealing with this problem but I wasn't able to find a real solution for this.
    So far I'm pretty familiar with table iterators but I have no idea how to handle the summary row to be the last line in a table, even if sorting and navigation by page is allowed in the tableview.
    I think you definitely have to add this summary row in your internal table, since you can not add a virtual row in your tableview. And you can custom render this row or respectively each cell for instance with a different color but how to force this row always to appear as the last row in every tableview page (navigation=BYPAGE).
    Does anyone have a solution for that?
    Thanx
    Oliver

    Ok, here is what I came up with (hoping I got your problem right):
    In your tableview you are displaying <b>x</b> rows, and after these rows you want your sum row to be displayed.
    I have done quite some things with iterators, but why not do without one here
    Altering the internal table can do as well:
    Try to insert a new row after every <b>x</b> rows into your internal table which holds the needed sum values, and then change your tableview to display <b>x+1</b> rows.
    In you case you need to do some operations with your internal table (to avoid the sum rows messing up the results) you should somehow "mark" these sum rows so you can distinguish them later on.
    Hope this is helpful for your problem.
    Max

  • Tableview Filter/Sort Always open a new window!

    Dear experts,
    I have came accross a weird problem. When user filter/sort function in a tableview, a new window always display automatically with the result. But the old page does not change accordingly. But when you use filter/sort function in the new window, it's fine.
    I think this may because my old window is a ModalDialog window. It was opened using "
    javascript:window.showModalDialog". When using filter/sort function, a real window rather than a dialogue appears with the correct result. But this is not what I wanted. I want to display the filter/sort result in the dialogue window, anything could solve this problem?
    Thanks in advance,
    Sinvaya

    The easiest way to open new windows in Finder, Safari and just about any other program in Mac OS X is to use the keyboard shortcut, 'Command' + 'n'

  • Initial sort in the TeanViewer

    A question about the TeamViewer:
    I want to sort the columns when the TeamViewer is loaded. That should be done in the parameter
    SortColName
    . But what value should I use?
    Kind Regards Morten Prom

    Out of date

  • Sort in a tableview

    Hello,
    my internal table has 10 records which are displayed in a Tableview. The user has the option to sort the information (asc/desc) according to the column which he wishes. Then he has to select a line to display the data of this record. It works perfect if there´s no sort but if the user sorts the table, the internal table is not sorted.
    If the user selects record 3 on the Tableview, that record could be Nr. 9 in my internal table. How can I sort at the same time my internal table ??
    Thanks
       Coding
    <htmlb:tableView id              = "result_mat"
                     selectionMode   = "SINGLESELECT"
                     headerText      = "<%= otr(SOTR_VOCABULARY_BASIC/RESULT) %><%= otr(SOTR_VOCABULARY_BASIC/LIST) %>"
                     headerVisible   = "true"
                     emptyTableText  = "<%= otr(/SIE/AD_ZDXD0001/SUCHEF4) %>"
                     sort            = "SERVER"
                     visibleRowCount = "12"
                     columnDefinitions = "<%=columns%>"
                     onRowSelection  = "EventRowSelection"
                     table           = "<%= tab_material %>" />

    you can handle it in two ways, to have sort and also reading the right selected record from the itab.
    option1. instead of using SORT = "SERVER" use "APPLICATION" in this case you have to manually handle the sort.
    code sample for the same.
    page attributes:
    sort_element     TYPE     STRING
    sort_event     TYPE     STRING
    s_event     TYPE     CHAR1
    layout
    <%  if sort_event is initial .
      move: 'A' to sort_event .
      endif .
      if sort_event eq 'A' .
      if not sort_element is initial .
      sort <outtab> ascending by (sort_element).
      else .
      sort <outtab> ascending .
      endif .
      elseif sort_event eq 'D' .
      if not sort_element is initial .
      sort <outtab> descending by (sort_element).
      else .
      sort <outtab> descending .
      endif .
      endif .
          %>
          <htmlb:tableView id                  = "test"
                           headerVisible       = "false"
                           footerVisible       = "true"
                           onHeaderClick       = "<%= sort_event %>"
                           table               = "<%= <outtab> %>"
                           iterator            = "<%= grid_iterator %>"
                           columnDefinitions   = "<%= col_control_tab %>"
                           width               = "100%"
                           columnHeaderVisible = "true"
                           sort                = "APPLICATION" />
    oninputprocessing.
    CLEAR s_event .
    CLASS cl_htmlb_manager DEFINITION LOAD.
    DATA:   event           TYPE REF TO cl_htmlb_event .
    data: tv type ref to cl_htmlb_tableview.
    data: tv_data type ref to cl_htmlb_event_tableview.
    event = cl_htmlb_manager=>get_event( request ).
    IF event->event_type EQ cl_htmlb_event_tableview=>co_header_click .
      s_event = 'Y' .
      tv ?= cl_htmlb_manager=>get_data(
                              request      = runtime->server->request
                              name         = 'tableView'
                              id           = 'test' ).
      if tv is not initial.
        tv_data = tv->data.
      endif .
      sort_element = tv_data->column_key .
      if event->SERVER_EVENT eq 'A' .
      sort_event = 'D' .
      elseif event->SERVER_EVENT eq 'D' .
      sort_event = 'A' .
      endif .
    ENDIF .
    option 2:
    use  keyColumn           = "<itab key filed name in uppercase>"
    <htmlb:tableView id                  = "test"
                               design              = "ALTERNATING"
                               headerVisible       = "true"
                               headerText          = "List of Low Value Assets"
                               table               = "<%= det_tab             %>"
                               width               = "100%"
                               columnHeaderVisible = "true"
                               sort                = "SERVER"
                               filter              = "SERVER"
                               filterButtonText    = "Go"
                               columnDefinitions   = "<%= col_control_tab       %>"
                               keepSelectedRow     = "TRUE"
                            <b>   keyColumn           = "KEY_COL"</b>
    where key_col is a column in the itab which holds the concatenated value of key fields.
    for example if your itab has say order no., item number, value  and the key is order number and item number.
    concatenate them and place it in the key_col field and dont show that in display mode.
    and in oninputprocessing you can read the selected row value like below.
    if event->event_type eq cl_htmlb_event_tableview=>co_row_selection .
      data: tv type ref to cl_htmlb_tableview.
      tv ?= cl_htmlb_manager=>get_data(
                              request      = runtime->server->request
                              name         = 'tableView'
                              id           = 'test' ).
      if tv is not initial.
        data: tv_data type ref to cl_htmlb_event_tableview.
        tv_data = tv->data.
        if tv_data->selectedrowindex is not initial.
          data: row like line of <itab> .
    either you can use this index to read the itab or
    tv_data->selectedrowkey will hold the selected rows key_col value which you can use to read the itab.
    Hope this helps.
    Regards
    Raja

  • Bug or feature: TableView sorts the underlying list?

    that's at least highly unexpected - all variants of table sorting I know, support some kind of sortedView on top of the user model (either by a framework outside of the table, as GlazedList, or internal as core swing).
    Is it a not-yet-done feature or yet another variant of leaving the hard stuff to the user dev?
    CU
    Jeanette

    JonathanGiles wrote:
    This is by-design. We consider the items list in the TableView to be the view model - clicking on a column results in the view model being sorted.
    There are ways around this. If you provide a TransformationList (e.g. SortedList) wrapped around an ObservableList, the TableView will sort the SortedList, leaving the underlying ObservableList unsorted and still available via SortedList.getDirectSource() or getBottomMostSource() (depending on how many layers of wrapping you have).that's exactly what I keep complaining about:
    - framework handles the trivial stuff: it simply pushes a comparator into a sortable list is or lets collections.sort do the work
    - developers are left with the harder parts like index mapping
    Actually, the framework is hit by those missing harder parts as well:
    - SortedList freaks out on mutable elements, basically because the internal index mapping is not optimal (http://javafx-jira.kenai.com/browse/RT-14965)
    - Selection synch is broken when sorting/filtering (and TableView taking the extreme easy way out in clearing ... tseee), don't have a report handy, but know that you are aware of the issue : - )
    - no way to "unsort" a TableColumn (http://javafx-jira.kenai.com/browse/RT-15166) in the general case. Even for a SortedList, that would involve to restore the original comparator (instead of leaving the TableColumnComparator in place)
    Cheers
    Jeanette

  • How to get number of rows in tableview

    Hello,
    Could anybody help me on how to get the number of rows in a tableview? Sort of using DESCRIBE TABLE in classic ABAP.
    Thanks,
    Ricky

    There is an attribute of the class CL_HTMLB_TABLEVIEW named
    ROWCOUNT.
    Inside an event u need to get this info use this code:
    Replace 'Monitor'  for the ID of your tableview
    DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW,
          r_count  type i,
          tv ?= CL_HTMLB_MANAGER=>GET_DATA(
          request = runtime->server->request
          name = 'tableView'
          id = 'Monitor' ).
          IF tv IS NOT INITIAL.
            DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
            tv_data = tv->data.
            r_count = tv_data->rowcount.
          ENDIF.

  • ADF FACES: how to preserve the sort criteria for an af:table

    How can I preserve the sort criteria on an af:table across page invocations? I've searched all through the forum and I don't see anything on this topic.
    I simply want the sort criteria (from when the user clicks on a column header) to be remembered across multiple uses of the page. I know that the control handles this itself for multiple invocations of the same page (like when you page through the table). But I need to preserve the sort order so I can install it again when someone leaves the page and then returns to it.
    I've tried various attempts using a SortListener to record the sort criteria, but I can't figure out how to reinstall the criteria without generating exceptions from the table control.
    Any pointers on how to do this would be greatly appreciated.
    Thanks.
    Larry.

    Ok, I've solved the problems with the odd behavior by always creating a new model when the table data changes and copying the sort criteria into the new model, like this:
            // Construct our own CollectionModel from this result set
            if(_model == null) {
                // Construct the initial data model and set the starting sort criteria
                ListDataModel m = new ListDataModel(results);
                _model = new SortableModel(m);
                // Set the sort criteria to last name
                ArrayList criteria = new ArrayList();
                criteria.add(new SortCriterion("lastName", true));
                _model.setSortCriteria(criteria);
            } else {
                // Construct a new model so the table "sees" the change
                ListDataModel m = new ListDataModel(results);
                SortableModel sm = new SortableModel(m);
                sm.setSortCriteria(_model.getSortCriteria());
                _model = sm;
            }But, I end up with one final thing that doesn't work. In the "then" clause above, I try to set the initial sort criteria for the table - it has no effect. When the table is rendered, it is not sorted in any way.
    How can I specify an initial sort order for the table? Why is it ignoring the sort criteria on the model?
    Thanks.

  • SORT in a BSP applicaiton doesnt work

    Hi Experts,
    In my BSP Application , I use a table and below is code for the
          <htmlb:tableView id              = "WRKLST"
                           headerText      = "My Worklists"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "<%= RowCount%>"
                           filter = "SERVER"
                           sort   = "server"
                           fillUpEmptyRows = "TRUE"
                           emptyTableText   = "No entries found"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "rowselection"
                           selectionMode   = "multiselect"
                           table           = "<%= IT_WRKLIST %>"
                           iterator ="<%= iterator%>" >
    But the sort is not very efficient. ie., it always sort only on the first click of the header 's. and also it sort only on key field.
    Can anybody suggest me an option , so that on every click it sorts ascending / descending based on the click of the header.
    ie., If the user clicks on 'Partner Name' , it should sort the table content based on Partner name and if the click on 'Priority', it should sort on priority.
    Please suggest.
    Regards,
    Shiny

    Dear Shiny
    Please check these posts.
    I think you will need to sort the table yourself and then have the page refreshed.
    [Sort in a tableview;
    [Table Sort;
    Kind Regards
    /Ricardo Quintas

  • Table sort is not working for columns.

    Hi,
    I am using TableSort.java class. Followed https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/library/user-interface-technology/wd%20java/wdjava%20archive/developing%20with%20tables%20in%20web%20dynpro.pdf
    to create the action and assigned that to onSort event for the table. When I run, I see the ascending-descending icons besides the columns, but nothing happens when I click them. Here is the context.
    Context
    l
    l
    l ---User_Table
             > Email
             > Name
            |
             > Office
    Here Name is a custom string (last name, first name). Also office is a custom string (office1, office2, ...etc).
    Edited by: srinivas M on Feb 8, 2009 6:03 AM
    Edited by: srinivas M on Feb 8, 2009 6:03 AM

    Hi Srinivas,
      If you want to do an initial sort. You have to add the following method to the TableSorter class.
    public void initialSort(String columnId, IWDNode dataSource) {
              // find the things we need
              String direction = WDTableColumnSortDirection.UP;
              IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
              NodeElementByAttributeComparator elementComparator = (NodeElementByAttributeComparator) comparatorForColumn.get(column);
              if (elementComparator == null){
                   //not a sortable column
                   column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE);
                   return;
              // sorting
              elementComparator.setSortDirection(WDTableColumnSortDirection.valueOf(direction));
              dataSource.sortElements(elementComparator);
    In your wdDoModifyView() after initializing the tablesorter class you have to call the above method.
    if (firstTime) {
                IWDTable table = (IWDTable) view.getElement("Table");
                wdContext.currentContextElement().setTableSorter(
                   new TableSorter(table, wdThis.wdGetSortAction(), null));
                      wdContext.currentContextElement().getTableSorter().initialSort("Your Column ID", wdContext.nodeUser_Search_Results());
    Can you double check in your code if the table is bound to the node "User_Search_Results" and not "User_Table". If the table is bound to the "User_Table" then the sort will not work since in the code you are sorting the node "User_Search_Results".
    If you want to implement sort on only one column you can use the alternate constructor for the TableSorter class.
    TableSorter(IWDTable table, IWDAction sortAction, Map comparators, String[] sortableColumns)
    You have to give a String array of columns that need to be sort enabled.
    Regards,
    Sanyev

  • Sort order inconsistent behavior

    There seems to be inconsistent behaviour when defining a default sort order sequence.
    Everything works as expected when the display sequence and the order in which the columns are defined in the query are the same but as soon as the display sequence is changed the default sort order doesn't work for the second column in the order sequence.
    I have put up an example at [apex.com|http://apex.oracle.com/pls/otn/f?p=36885:1]
    In report EMP the display sequence and query sequence are the same and the default sort on "Job" and "Hiredate" is correct working. Even when the user sorts on "Manager".
    The sort order sequence then becomes "Manager", "Job" and "Hiredate". As also descripted in the following Sorting on multiple columns
    And exactly the behaviour we are looking for.
    Report EMP2 is a copy of EMP with the only difference the order in which the columns are displayed
    Now the default sort order doesn't work as expected. The report is first ordered on "Job" but then on "Employee" instate of "Hiredate" as is defined. Interestingly "Employee" is the second column in the query.
    It seems that instate of the query_column_id the column_display_sequence is used in the order by. At least for the second column in the defined sort order sequence.
    This may also explain the behaviour mentioned with [derived columns and sort sequence|http://forums.oracle.com/forums/thread.jspa?messageID=1006429&#1006429]
    The display sequence in report EMP2 is where the wizard came up with.
    Nicolette

    Stew
    At the report attributes you can define the sort sequence of a column. When you do that initialy the report is sorted as you defined it. So in my example that is first by "Job"and within "Job" by "Hiredate". When the user sort explicit on an other column this column is put before the columns you have defined.
    So when the user clicks on "Manager" the sort order becomes "Manager", "Job", "Hiredate". When the user then sort on "Employee" the sort order becomes "Employee", "Job" an "Hiredate".
    This works when the order in which the columns appear in your query are the same as the order in which they are displayed.
    BUT as soon as the display order changes the sort sequence doesn't work anymore. Even worse is that also the initial sort sequence doesn't work for the second column any more. (I haven't tested for three or more columns)
    In the example I have put on apex.com in the second report the sort sequence of the report attributes is the same as in the first report. But the initial sort order that is actually done is on "Job" and "Employee" instate of "Job" and "Hiredate". Where "Hiredate" is the second column in the display sequence. But "Employee" is the second column in the query.
    So to really make use of the sort sequence you have to keep your display sequence equal to the order in witch they appear in the query. This isn't really practical.
    Nicolette

Maybe you are looking for