Report Column Sorting problem

I have a report based on a view. For some reason some of the columns are not being sorted correctly. After pressing the column header to sort date columns the underlying data is not sorted properly (it’s out of order) or it’s not sorted at all.
Can you please let me know if there is a known bug causing that?

I think I'm having the same problem.
I have a report with data columns, several "not shown" columns, and several column links. I've noticed that any columns in the query after a certain point, will not sort the correct column. If I show all the columns and allow them all to sort, then some of the columns will sort the data in another column. (for example clicking on the header/sort link for column x sorts the table by column y and clicking on the sort link for column z sorts column x, etc).
I've noticed that I can move columns around in my select query and no matter how they are arranged, after the 7th or 8th column in the select statement, none of the columns following that will sort properly. I've tried all kinds of things, changing my select query around, enabling and disabling sorting, adding additional null columns in, setting and unsetting the default sort order, changing the order of the columns in the report. I don't have an order by in my query or anything weird besides some where clauses (most of which are from the default search functionality).
Has anyone found a solution to this problem? We just upgraded from HTML DB 2.2 to APEX 3.0 and the problem remained the same.
Thanks,
Greg

Similar Messages

  • Classic report column sorting

    Hello to APEX forum
    My Apex version is 4.2.1,
    database version is Oracle 10g XE on Windows 7 Pro
    After upgrading from version 3.2 to 4.2.1 report column sorting doesn't work when "Enable Partial Page Refresh" is set to "Yes".
    When "Enable Partial Page Refresh" is "No" sorting is OK.
    Please, help
    Regards
    Mark

    Hi Mark,
    it looks like your json.js causes troubles. It extends every JavaScript "object" with two methods called toJSONString and parseJSON. I did a quick debugging and it looks like when we construct our AJAX request to do the sorting, the jQuery AJAX handling tries to serialize those two function because it thinks it's regular data and fails with a JavaScript error.
    Looking at the original source of your library at https://github.com/douglascrockford/JSON-js even the creators had some doubts using that version of the library
    json.js: This file does everything that json2.js does. It also adds a toJSONString method and a parseJSON method to Object.prototype. Use of this file is not recommended.
    Are you sure that you need the parseJSON and toJSONString methods? Maybe you are fine with json2.js as well.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Report column sort not working

    Hello,
    Apex 4.1
    I have a master-detail report and form. I have ticked the "Sort" box in the Report Attibutes to sort by one of the fields, a text field. However, when I click on the column heading to sort the report it sorts by the primary key id column instead.
    Is there something else that needs to be done to enable a sort on a column?
    Kind regards,
    Simon

    Hi,
    Login to APEX builder. Run your page.
    Select columns from report action menu and save default layout.
    Regards,
    Jari

  • ADF Faces: columns sort problem

    Hi all,
    I'm new ADF Faces italian user and I have some problem sorting columns of table component...
    I have tried to convert my ResultSet in a List, and the data are correctly inserted in the "af:table" but the column sort don't work...
    I have already read the "af:table" Oracle specification but I have not just found a solution...
    This is the part of my backing bean that return the List:
    private List anagsList;
    public List getAnagsList()
    Connection connection;
    Statement statement;
    ResultSet resultset;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.168.75:1521:ORA1", "EL2DEMO", "admin");
    statement = connection.createStatement();
    if(inputText1.getValue().toString().equals(""))
    resultset = statement.executeQuery("SELECT AN_RAGSOC, AN_NOME, AN_DATANASCITA FROM ANAGS");
    else
    String query="SELECT AN_RAGSOC, AN_NOME, AN_DATANASCITA FROM ANAGS WHERE ";
    query=query + "AN_RAGSOC LIKE '%" + inputText1.getValue() + "%' OR ";
    query=query + "AN_NOME LIKE '%" + inputText1.getValue() + "%' OR ";
    query=query + "AN_DATANASCITA LIKE '%" + inputText1.getValue() + "%'";
    resultset=statement.executeQuery(query);
    anagsList = new ArrayList();
    while(resultset.next())
    anagsList.add(new AnagsRecord(resultset.getString(2), resultset.getString(1), resultset.getString(3)));
    resultset.close();
    statement.close();
    connection.close();
    catch(Exception e)
    System.out.println(e);
    return anagsList;
    This is my AnagsRecord class:
    package mypackage.backing;
    public class AnagsRecord
    private String nome;
    private String cognome;
    private String dataNascita;
    public AnagsRecord(String nome, String cognome, String dataNascita)
    setNome(nome);
    setCognome(cognome);
    setDataNascita(dataNascita);
    public String getNome()
    return nome;
    public void setNome(String nome)
    this.nome = nome;
    public String getCognome()
    return cognome;
    public void setCognome(String cognome)
    this.cognome = cognome;
    public String getDataNascita()
    return dataNascita;
    public void setDataNascita(String dataNascita)
    this.dataNascita = dataNascita;
    And this is table component:
    <af:table var="al" emptyText="No records found."
    rows="20" value="#{backing_ADFFaces.anagsList}"
    banding="row" bandingInterval="1">
    <af:column sortable="true" sortProperty="dataNascita">
    <f:facet name="header">
    <af:outputText value="DATA NASCITA"/>
    </f:facet>
    <af:outputText value="#{al.dataNascita}"/>
    </af:column>
    <af:column sortable="true" sortProperty="cognome">
    <f:facet name="header">
    <af:outputText value="COGNOME"/>
    </f:facet>
    <af:outputText value="#{al.cognome}"/>
    </af:column>
    <af:column sortable="true" sortProperty="nome">
    <f:facet name="header">
    <af:outputText value="NOME"/>
    </f:facet>
    <af:outputText value="#{al.nome}"/>
    </af:column>
    </af:table>
    I have already installed the ADF Faces demos (column_sortable.jspx) and it works well, but the backing bean is not very understandable...
    please help me...
    ciao!

    Hi,
    I have the same problem (with another language), national characters are not sorted properly.
    Any pointers how to solve this?
    Regards,
    Patrik

  • Hideshow region column sort problem

    Hi,
    I have a HideShow region containing a PPR report. All is well except that the region hides when I click a column header to sort.
    Anyone got a solution to this?
    I've tried a few methods involving trying to store the ID of the region in a user-preference, but so far no joy.
    Seems the kind of thing we need a generic method for.
    Many thanks,
    John D

    carl,
    Thanks for the quick response.
    Glad to hear that it's a fairly easy fix, but sad to say I don't know how to implement it. Could I ask you to be more explicit?
    I will be too. The problem affects any hideshow region with sortable columns, so I'm looking ideally for a generic fix.
    The specific case in point is a page with 3 reports, each in a hideshow region and each in a ppr report template (though the ppr bit is irrelevant - happens with standard templates too, as it would).
    The column headers generate HTML such as:
    HREF="f?p=100:625:1253185985800118:fsp_sort_2::RP&fsp_region_id=2004914903282889">FirstName<(I left out the <A... A> to aid legibility here)
    So I guess (yep, guess) what's required is something like:
    - on an fsp_sort request, somehow trap and store the ID of the given region;
    - either in the page onload code, or maybe in the page footer, fire the onclick method for the toggle element for the given region, as you suggest.
    Unfortunately this is currently beyond me. Any further help will be much appreciated.
    Thanks
    john

  • Report column sorting

    Hi All,
    I have a oracle report which extracts the output in csv format. I have to add to new columns in the exisiting report. After adding the new column, those columns are not apperaing as kept in the repeating frame. The new columns comes first in csv file and then the rest of the columns. I need that columns to be inserted in 5th and 6 th position.
    Please tell me is how to do this.
    Thanks in advance,
    Jeeva.

    Hi Ammad,
    I am using oracle reports 10g. Thanks for you reply ..... My problem has been resolved. The excel output is genereated based on the order of the column in the first group data model .. After changing those columns i can able to see the output in the specified manner.
    Thanks again for you time :)
    Jeeva.

  • Column sorting problem

    The fields which represent prices are not sorted logically at
    all, whether I set the column type to "number" or not. If the price
    list contains values {90, 60.5, 42.5, 400}, sorted ascending gives
    {90, 60.5, 42.5, 400} and descending {400, 42.5, 60.5, 90}??? And
    how can I achieve to have two decimal numbers even if the number is
    whole like 90 => 90.00 or 60.5 => 60.50. Setting the colum
    type to "number" I lose these decimal numbers.

    If I have the following code:
    // data set
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("employees-02.xml",
    "employees/employee");
    ds1.setColumnType("value", "number");
    //-->
    </script>
    //html markup
    <div spry:region="ds1">
    <table>
    <tr>
    <th spry:sort="value">Value</th>
    </tr>
    <tr spry:repeat="ds1">
    <td>{value}</td>
    </tr>
    </table>
    </div>
    The xml file is:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <employees xmlns="
    http://www.foo.com/employees">
    <employee id="123543">
    <value>90</value>
    </employee>
    <employee id="127944">
    <value>60.5</value>
    </employee>
    <employee id="127373">
    <value>400</value>
    </employee>
    <employee id="127373">
    <value>42.5</value>
    </employee>
    </employees>
    Please check with you page what's wrong, because with the
    code that I gave you above it works.
    Diana

  • Embedded images disappear on column sorts when viewing SSRS via url in an iframe

    RE:   SQL Server - 2008 R2  Reporting Services
    We deliver an ASP.Net MVC (5) application and some of the views show/display SSRS report via url in an iframe (so the report is displayed vi the web viewer).   There are images in the header of some of these reports which display correctly on the initial
    view, but "disappear" when the user uses a report column sort and/or changes the report zoom (via the SSRS web viewer toolbar). There are other quirky behaviors as well (depending on the browser), but we are dealing with IE versions 8 thru 11.  I've
    already set the ReportViewer.aspx to use <meta http-equiv="X-UA-Compatible" content="IE=7">, and our application pages/views use <meta http-equiv="X-UA-Compatible" content="IE=edge">.
    Does anyone have a "fix" for this? I know it's related to the ReportViewer.aspx and displaying the report(s) in an iframe, but I can't seem to find any information on how to fix the issue.

    Hi,
    According to your description, when you preview report through url in an iframe, the embed images can be displayed, images can’t be displayed after users used sort and changed report zoom.
    To troubleshoot the problem, please refer to the following steps:
    Run the report in Business Intelligence Development Studio (BIDS) to make sure that the images can be displayed correctly.
    The issue may be relevant to compatibility of browser, please use different browser to check whether the issue persists.
    If you are using embedded image of jpg type, please change the extension of the image to png.
    Set the ReportViewer.aspx to use <meta http-equiv="X-UA-Compatible" content="IE=8">.
    Here is a relevant thread you can reference:
    https://social.technet.microsoft.com/Forums/en-US/56650bf4-e65d-4f84-8ac0-a57cb26543b2/image-disappears-when-sorting-in-ssrs-for-server-report-on-report-vieweron-aspx-page?forum=sqlreportingservices
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • Null Index Error When Sorting Standard Report Column

    I have a page in one of my application that contains three reports in three seperate regions within the page. You only see one report at a time, however, and control which one you see based on a sidebar table containing links that call javascript functions to toggle the hiding/showing of each region.
    The problem stems from trying to use the standard column sort on any of the columns. When I click the column header in any of the the reports, the page submits the request to sort the column (for example: request="fsp_sort_6", etc...), and then the page refreshes with all three reports displayed. The report for which you actually 'clicked' a column header will be sorted. However the other two will display with an error (code ORA-06502) saying that the report cannot parse the query because of a null key index value in one of the corresponding tables being queried.
    The weird thing is - this only happens on other computers - not when I'm on my workstation developing in my apex workspace/schema. I've even given each of the three reports a seperate static ID attribute so that I can identify each using those unique IDs.
    I have to say - I am stumped. Any help would be much appreciated. If you need more details, feel free to respond to this thread.
    Thanks!

    What version of APEX are you using? This was supposed to be fixed in 3.1 however it isn't because we still experience it sometimes, we just have never been able to re-create it in order to raise an SR. Getting to the bottom of this would be fantastic for us as it's the one thing which makes me extremely nervous of implementing new applications which are production-critical. The only workarounds are to flush the SGA or edit the report in production so the query is different (usually just fetch back null somewhere and then hide the column). This clearly isn't acceptable however without a reproducable test case there isn't much which can be done! :(

  • Reports serialising when column sort attributes used

    If an Apex user has two sessions and runs the same report page in both, then if the report uses column sort attributes (rather than an ORDER BY in the SQL), the second is blocked by the first; once the first completes the second then runs and completes. This appears to be because the user preferences for column sorting are being updated each time, even if they have not been changed.
    This application demonstrates the problem:
    http://htmldb.oracle.com/pls/otn/f?p=15827:2
    Create 2 sessions using that URL. The page has a report based on ALL_OBJECTS with an item "Owner" to filter on. Enter "%" in the first session and press Enter and the report will run, taking about 1 minute. Meanwhile in the second session enter a specific owner (or just XXX) and press Enter. The second report will finish just after the first finishes, even though when run alone it only takes half a second or so.
    Is this a bug?

    Hi Tony,
    If you're using this on unauthenticated pages, then the sort preferences are stored per user for the APEX_PUBLIC_USER (or HTMLDB_PUBLIC_USER), which is potentially why you're seeing the serialisation/dead-locking.
    Could you perhaps use the suggestion by Scott in this thread -
    Re: Report sorting affected by other users
    To use the session ID as the APEX user (or anything else you prefer), to mitigate the potential for the deadlock? (It's worth trying and should take just a few seconds to test in your sample app?).
    John.

  • Interactive Report wide Column Sorting hangs in Internet Explorer

    I have an application that contains an interactive report. The Column Sorting and Filtering functions work fine in Firefox. However, if I try to sort a wide (110 byte - it contains a hyperlink) column in Internet Explorer, APEX produces the 'loading data' image and then hangs. Even a sort of a narrow (3 byte) column is noticeably slower in Internet Explorer than in Firefox.
    We are running APEX 3.1.1 on Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production with the Partitioning, OLAP, Data Mining and Real Application Testing options

    Hello,
    I answer you over your post.
    Joe Bertram wrote:
    Hi,
    That's an interesting issue. What kind of images are these? Are they the default images installed or are they your custom set of images?The images are png files included as they were icons into the table.
    >
    You say the images disappear when you sort the report. Does it happen when you sort on demand in the dashboard or when you sort it in the report itself? Or both?Only when sort from the dashboard. From the report itself, the answers works fine.
    >
    What are your environment details?Server:
    OBI 10.1.3.4.1.090414.1900
    Windows 2003 server
    JDK 1.6.0.17
    Thin Client:
    Internet explorer 8
    >
    Thanks for the extra info.
    Best regards,
    -JoeIt happens also in other two environments (Development and Pre-production) with the same SW architecture.
    Thanks for your time.

  • Problem with Column Sorting in Request Table View

    We've enabled column sorting on the table view in an Answers request but it doesn't work when more than around 400 rows are returned. It works Ok when fewer than 400 rows are returned. Does anyone know if there is a specific limit to the number of rows where column sorting works?
    Thanks,
    Mike

    I've dug into the query log a little more. When this request returns more than around 400 records and you click on a column heading to sort the table view, the query from the log is not changing to reflect the new sort order. It stays as whatever the default sort order was for the request.
    Column heading sorting on other requests in different subject areas on this same server works fine. I've tested this other request with up to 6400 rows returning and it's sorting works.
    All caching is turned off for the subject area.

  • Problem with column sort in myFaces dataTable

    Hello,
    In my dataTable I am trying to do a column sort on each column, When i click on the column header link nothing is happening. Could somebody please help. Please let me know if I am missing something.
    Here is the code.
    The jsf is as follows:
    <h:panelGrid columns="1" styleClass="tableHeaderAction">
    <t:dataTable id="fooS" value="#{supervisorsDto.tableRows}"
    var="tableRow" rows"30" styleClass="dataTable"
    headerClass="tableHeader" first="0"
    columnClasses="string,string,string,string"
    rowClasses="odd,even"
    sortAscending="#{supervisorsDto.ascending}"
    sortColumn="#{supervisorsDto.sort}"
    preserveSort="true" >
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="lastName" arrow="false">
    <t:outputText value="#{screen.lastName}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.lastName}" />
    </t:column>
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="firstName" arrow="false">
    <t:outputText value="#{screen.firstName}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.firstName}" />
    </t:column>
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="loginName" arrow="false">
    <t:outputText value="#{screen.loginName}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.loginName}" />
    </t:column>
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="team" arrow="false">
    <t:outputText value="#{screen.team}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.team}" />
    <h:inputHidden id="key" value="#{tableRow.empID}" />
    </t:column>
    </t:dataTable>
    </h:panelGrid>
    The sort method in SupervisorsDto is as follows:
    public class SupervisorsDto implements Serializable {
    private String sort="lastName";
    private boolean ascending= true;
    @SuppressWarnings("unchecked")
    public void sort(final String column,final boolean ascending)
    Comparator comparator = new Comparator()
    public int compare(Object o1, Object o2)
    Supervisors c1 = (Supervisors)o1;
    Supervisors c2 = (Supervisors)o2;
    if (column == null)
    return 0;
    if (column.equals("lastName"))
    return ascending ? c1.getLastName().compareTo(c2.getLastName()) : c2.getLastName().compareTo(c1.getLastName());
    else if (column.equals("firstName"))
    return ascending ? c1.getFirstName().compareTo(c2.getFirstName()) : c2.getFirstName().compareTo(c1.getFirstName());
    else if (column.equals("loginName"))
    return ascending ? c1.getLoginName().compareTo(c2.getLoginName()) : c2.getLoginName().compareTo(c1.getLoginName());
    else if (column.equals("team"))
    return ascending ? c1.getTeam().compareTo(c2.getTeam()) : c2.getTeam().compareTo(c1.getTeam());
    else return 0;
    Collections.sort(tableRows, comparator);
    public void sort(String sortColumn)
    if (sortColumn == null)
    throw new IllegalArgumentException("Argument sortColumn must not be null.");
    if (sort.equals(sortColumn))
    //current sort equals new sortColumn -> reverse sort order
    ascending = !ascending;
    else
    //sort new column in default direction
    sort = sortColumn;
    ascending = isDefaultAscending(sort);
    sort(sort, ascending);
    protected boolean isDefaultAscending(String sortColumn)
    return true;
    public String getSort() {
    return sort;
    public void setSort(String sort) {
    this.sort = sort;
    public boolean isAscending() {
    return ascending;
    public void setAscending(boolean ascending) {
    if(ascending != this.ascending)
    this.ascending = ascending;
    Thanks!

    I think I get really good at answering my own questions.
    It seems when you select the sort option on a column you must also set the "Sort Sequence".

  • Report query parsing problem

    I didn't find any report of this problem...
    Using APEX 3.0.1.00.07, I have a report of type "SQL Query (PL/SQL function body returning SQL query)" with the "Use Generic Column Names (parse query at runtime only)" radio button selected.
    When the region source contains the string "ORDER BY" in any form that I've tried (even in a comment), attempting to save the region fails with "Your query can't include an "ORDER BY" clause when having column heading sorting enabled."
    I do indeed have column sorting enabled on certain columns, but I don't see how that is relevant under these circumstances since the query produced at runtime does not have an ORDER BY clause.
    Am I overlooking something or is this a parsing problem?
    Rodney

    Rodney,
    It's just checking for order by being included in your query, and if so and you have column heading sorting enabled, it's raising this error because you can't have both (even if it's commented out).
    Regards,
    Marc

  • How to display data in interactive report column without colons (:)

    Dear Apex gurus,
    I'm a newbie and have just created an Apex application from a spreadsheet. I've created a named list of values and used it in a checkbox against a field in the default page 3 Create form.
    When I've selected multiple values in my check box in the form, the data in the interactive report appears as one line with colons separating the selected values like this: Dog:Cat:Bird
    What I would like is to have the data appear in the interactive report column as a multi-line list like this:
    Dog
    Cat
    Bird
    I can work around this by modifying the SQL code in the Region Source of the Region Definition of the report (Default Page 1 interactive report) to replace the colons with <br>
    SELECT replace("PETS_CHOSEN",':','<br>') "PETS_CHOSEN", FROM "MYAPP" Note: this doesn't format properly in the posting. I replace the colon with a html br
    This works, but seems to be a hack to me. I am guessing that I've missed a simple option setting somewhere, but I can't find it.
    The other problem with this solution is that when I export the report to Excel, what is exported is Dog<br>Cat<br>Bird, which is seems worse than colons.
    Thanks,
    - Morgan
    Edited by: mnrussel on 16-Feb-2009 04:13

    Hi Morgan,
    I think you have at least two choices:
    1 - Replace the colons with ', ' (comma and space) - sort of reasonable on screen and in an export
    2 - Create a second page that has the same report but uses the "export: csv" template. Create a manual link to this page to replace the standard Export link. When such report pages are requested, they download immediately instead of displaying. You can, therefore, use commas in this one and &lt;br&gt; tags in the on-screen report version
    Andy
    ps - To display tags in a post, use &amp;lt; for &lt; and &amp;gt; for &gt;

Maybe you are looking for

  • Deleting i-tunes from hard disk

    When I delete a song from my library, there is no pop-up option to delete the song from my hard disk. I need to free up space. I am using the Windows XP portion of my Mac. Can anyone help me? Thanks

  • Script to Update Item GL Class Assignments in OPM Inventory?

    We use OPM Inventory in our 11i.5.10CU2 process manufacturing environment. GL Class codes are assigned as categories to items in our OPM item master. We have a need to update the GL Class assignment to a new value for roughly 200,000 items. I've been

  • SQL Server on Azure: Performance Nightmare

    Martin2012 wrote:what types of disk have you got holding the SQL data? Hopefully stripped SSDshttps://msdn.microsoft.com/en-us/library/azure/dn133149.aspxCan you you the SQL as a Service http://azure.microsoft.com/en-gb/services/sql-database/ or do y

  • Row Fetch on View doesn't work / Custom procedure needed???

    Hello guys! Again I have a problem. It seems like once I finish one problem I stumble into another one. :-( Would is breaking my neck is the following problem. I have a view based on a query that joins 3 tables including one via a database-link. I wo

  • Developer Toolbox does not support ColdFusion

    Hi, I just recently find out some functions in developer toolbox do not support ColdFusion. Example in login settings, both restrictions tab and history tab are not available for ColdFusion. Why? Best regards Kenneth