Sort in Report

Hi:
I made 2 SQL reports, and they have sort property on in several fields. When I make (in runtime) sort on the report that it is in the top, the other one stays with this error:
" failed to parse SQL query:
ORA-06502: PL/SQL: numeric or value error: NULL index table key value "
Can anyone help me???
Thanks

Hi Marc,
I have the same problem and tried your suggestion and all other combinations.
I have weird results. In one page all the reports with the sorting are working fine but if I copy the page all the reports are genearting that error. When I recreate the SQL-Statment "sometimes" I can invoke the sorting but I don't know how to replicate it.
A colleague in my project has the same error on a differnt site. He has 2 reports on his site and when he checks the sorting on the one report he gets the error on the other report...?
There must be still an issue?
Regards, Juergen

Similar Messages

  • Sorting in report 10g?

    Hello Experts,
    Could you please help me? Is there a way to sort Oracle report by formula column? We selecting some columns in the report and one of the columns is a complicated select from different tables returning value. We want to sort the report by this column. How to do that?
    Thanks for your help.
    Yash

    Hello,
    You can move the formula column at the top of the query and the select its Break Order property(more on this in Reports Builder Help Contents).
    Regards,
    Alex
    If someone's answer is helpful or correct please mark it accordingly.

  • Sorting the report by clicking the column header

    Hello,
    Currently working on a requirement where i need to sort the report by clicking the column header. Can anyone please help me on this.
    Suppose i have 3 colums deptno,dname,sal fields in my report. if i click deptno column header,  report has to sort by deptno.Like that i need for other columns also.
    Any help is really appreciated
    Thanks
    Ram

    Hello,
    You can sort the fields using method suggested by Cauvery. However if you would like to have Ascending/ Descending sort order control at column header, then would require to implement few additional steps.
    First do the sorting of field using the way suggested by Cauvery. Once sorting is done, right  click on the column name and  select the option ' Bind Sort Control'. You will see the sorted field in the window. select the field and click ok.
    Now you would get 2 arrows on column. If you click upper arrow, fields would be sorted in Ascending Order and if you click on down arrow, it would  be in Descending order.
    Regards,
    Chinmay Athavale

  • Can we sort saved report list by name

    Hi,
    I have interactive reports and users can open this interactive report and according to their different requirements they can save this report(as a public) with different names.
    Ex: interactive reports
    Reports(lov) :1.Primary report
    2.xxx test
    3.yyyy
    4.abcd test
    5.zzzz test
    Can we sort saved report list by name?
    Could you please guide me to achieve this requirement.
    Thanks in advance.
    Regards
    Narender B

    Narender wrote:
    Hi,
    I have interactive reports and users can open this interactive report and according to their different requirements they can save this report(as a public) with different names.
    Ex: interactive reports
    Reports(lov) :1.Primary report
    2.xxx test
    3.yyyy
    4.abcd test
    5.zzzz test
    Can we sort saved report list by name?
    Could you please guide me to achieve this requirement.It's a lot easier to do so if the following information is provided (as has been repeatedly pointed out to you):
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    Sorting of the saved report list by report name was introduced in APEX 4.1.

  • Sort in Report not working correctly

    I have a report with many sorts selected as an option within the reports attributes. However, some of the columns does not seem to be sorting at all when Selected (Others do as expected)
    For example one column is a VARCHAR2
    examples of values within this column would be
    (FY08Q1, FY09Q4, FY08Q2)
    with the sort ticked in the report attributes i would expected it to perform the following
    FY08Q1
    FY08Q2
    FY09Q4
    which it does in the SQL Command - just not in the report in the Application.
    Anyone know as to a reason why it may be doing so?
    cheers
    s

    Hi
    I just created a test table, called datetest, with one column, called quarter. I inserted your data in the following order:
    FY08Q1
    FY09Q4
    FY08Q2
    I tested in SQLPlus that it returned ordered data ok with Select quarter from datetest order by 1, this worked.
    I then created a simple report based upon the query used in the previous paragraph and the report ordered the data correctly, i.e:
    FY08Q1
    FY08Q2
    FY09Q4
    Can you post your query as I can't work out what is wrong here?
    Thanks
    Karen

  • How to Sort the report by clicking the column_header at runtime?

    Hi,<br /><br />Im New to Crystal Reports.<br /><br />Im Using Crystal report server XI. and JSP<br /><br />I need to  <strong>Sort</strong> the report by clicking the<strong> column_header</strong> at runtime.<br /><br />How to implement this ?<br /><br />Please help me.<br /><br />- Venkat.<br />

    <p>Hi Venkat</p><p>I don&#39;t believe there is a way to do this out of the box.  I believe you would have to do a custom code solution so that when you click on the header the report is re-run with a different sort order.  This may not be that easy to implement.</p><p>I&#39;m going to check with the new WebElements custom functions that were released on this site.  They may provide for this functionality. <br /></p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • How to do merging of data and sorting in reports

    I am writing the ref cursor query to get the output in my report.
    I have to get the data from different data sources.
    I have to merge the data from different sources and finally sort it before showing in the report.
    Is there a way to do that ?

    Harish,
    I tried creating Some restriction Key figures and calculated key figures as I want this by every month as well. Not a straight forward (easy)way. I had to create many Key figures.
    I really appreciate your response.
    Thank you,
    Pavan.

  • 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! :(

  • Sorting Interactive Report results in no data found message

    Hi,
    I've got an interactive report which returns results based on the :REQUEST bind variable - I've got a navigation list at the side where all the items link to the current page with different Request values. The IR works fine until I try to sort any of the columns by clicking the header and choosing ascending / descending, at which point it returns no data found.
    It starts working again if I change the last line to OR :REQUEST IS NOT NULL but this breaks the functionality of the report, I want to return only the selected statuses, or all if no request variable is present. I'm guessing that sorting sets :REQUEST to something temporarily and breaks it. My query is below, any ideas?
    SELECT   id,
             job_number,
             appt_start,
             domain,
             pwa,
             status,
             tstamp_created
      FROM   fail_jobs
      WHERE  (status = 'NEW' AND userid_created != 'SYSTEM' AND :REQUEST = 'ARD')
         OR  (status = 'ATR' AND :REQUEST = 'ATR')
         OR  (status IN ('ERR','REV') AND :REQUEST = 'REV')
         OR  (status = 'COM' AND :REQUEST = 'COM')
         OR  (status IN ('PCD','PCA') AND :REQUEST = 'PCD')
         OR  :REQUEST IS NULLThanks

    There are known issues with Interactive Reports referencing :REQUEST value, probably due to some inner logic that also handles it simultaneously - potentially causing malfunction or deadlocks.
    One workaround I've learned is to create a computation to assign :REQUEST to a temporary item (a PXX_REQUEST, for instance) and reference it in the query, instead of :REQUEST. This has worked fine for me in my experience.
    Let me know if that helps - pls sign the thread as 'Useful' or 'Correct' if so, hence more people can benefit.
    tks,
    Kleber

  • ORA-06502 on  'SQL query' report with sort in 'Report Attributes'

    Hi All,
    We get the next error if we set sorting on a column in a 'Report' based on a 'SQL query'. Removing the sort, error disappeares:
    failed to parse SQL query:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    Any suggestions?
    Erik

    Erik,
    Thanks, this explains it. By specifying the request as part of your URL you run into the recently uncovered issue. The request you're setting is REMFROMLIST and ADD2LIST. You probably either have links that include those requests or you have branches where you specify them. Either way, in order to get reports sorting to work, you'll have to make sure that the request strings are not part of your URL. This is a work-around and the upcoming HTML DB patch release will solve this issue.
    One way of avoiding this is to have computations on the previous pages that set a napplication level or page level item to the REMFROMLIST and ADD2LIST values and then you can use those items for your conditions that are currently evaluating those strings.
    Hope this helps and sorry for the inconvenience,
    Marc

  • APEX report sorting makes report slow

    Hi,
    I have some reports in APEX that are fast (3 sec) when I have no sorting enabled and they turn slow (20 sec) when I enable column sorting.
    The reports are based on data running over a DB-link, all tables come from the same DB-link. When I launch the queries (with filled in parameters) in SQL+ then it takes no more then 5 sec (with or without sorting). The result is about 1000 to 2000 records (only showing 25 in the report with pagination).
    How can I make the report fast (less then 5 sec) with sorting enabled?
    Is there any known bug in APEX that is the source of my problem?
    Thanks in advance.

    Good point, but I already have recreated the report (delete and recreate) with no result. Cause I know that sometimes the reports run slow, cause they are somehow confused with the sorting, and in most cases it helps to recreate the report (which resets the report ID, so that it's like clearing the user preferences).
    First I thougt it had to do something with the user preferences, but I think that it is something different.
    I really don't know how to explain the time difference between SQL+ and APEX.

  • Sort Main Report on variable passed from Subreport

    Post Author: realw
    CA Forum: Formula
    I'm working on a CR XI report. I want to be able to sort the main report on a value in the subreport. I am trying to create a shared variable to pass that value from the subreport to the main report. So far, however, the formula containing the variable in the main report is not appearing as an option in the Sort dialogue box.
    My first question is, can this be done?
    If the answer is yes, then which sections in the subreport and main report should the formula appear in?
    What I have at this point is:
    In the last Details section of Subreport, formula @ssSubCreator
    WhilePrintingRecords;Shared StringVar Cre;Cre:= {CreCreat_csv.SummaryData};
    In the Report Header of the Main report, formula @ssCre
    Shared StringVar Cre:="";
    In the Details section of the Main report, following the section containing the Subreport, formula @ssCreator
    Shared StringVar Cre;Cre
    I can see that the data is passing correctly to the Main report. I've tried moving the formulas around to different sections in the sub and main reports but haven't gotten the formula to be sortable.
    Thanks in advance for any assistance,
    Will

    Post Author: bettername
    CA Forum: Formula
    How about just grouping the data in the main report on the formula? (Supress group header and footer, obviously)
    I don't have crystal to hand right now to check if that'll work though - you may run into problems with the 'cannot evaluate at this time' issue... but I use this technique for sorting data based on a chosen parameter (say: surname, forenames, age) in this way...

  • Implementing Interactive Reports Sorts in Report Query

    My users love how the Interactive Reports work, especially being able to choose their sort fields. I have an Report Query that can use multiple sorts and many sort fields (chose from APEX page). Is it possible to implement this type of thing in the Report Query (without using decodes or dynamic SQL).
    I looked at the code being executed by Interactive Reports and can see the order by changing
    select
    null as apxws_row_pk,
    "CODE",
    "CITY_NAME",
    "STATE_CODE",
    "PK_ID",
    count(*) over () as apxws_row_cnt
    from (
    select * from (
    select "PK_ID",
    "CODE",
    "CITY_NAME",
    "STATE_CODE"
    from "#OWNER#"."ZIP"
    ) r
    ) r where rownum <= to_number(:APXWS_MAX_ROW_CNT)
    order by "CODE"

    Ben, Not sure I follow.
    I'm passing in the column names of the order by's from my APEX page to the DB function. Right now I'm doing a huge case statement for each one.
    FUNCTION get_student_demographic (l_user in varchar2,
    l_owner in varchar2,
    l_report_order1 in varchar2,
    l_report_order2 in varchar2,
    l_report_order3 in varchar2,
    l_report_order4 in varchar2,
    SELECT (CASE l_report_order1
    WHEN '%null%' THEN ''
    WHEN 'LAST_NAME' THEN A.LAST_NAME
    WHEN 'FIRST_NAME' THEN A.FIRST_NAME
    ..... many more
    ELSE ''
    END ) report_order1,

  • How to do sorting in reports

    I am writing the ref cursor query to get the output in my report.
    I want to sort the output in my report.
    Due to some constraints I can't write order by clause in the Query.
    Is there any other way to sort the output ?

    Hi,
    I think you can try Break order of each column.
    Regards,
    George
    I am writing the ref cursor query to get the output in my report.
    I want to sort the output in my report.
    Due to some constraints I can't write order by clause in the Query.
    Is there any other way to sort the output ?

  • Sorting in Report

    How to do sorting in classical report?

    Sort the internal table that you want to print as the list.
    eg:
    if ITAB is the internal table you are printing, sort it like this
    sort ITAB.
    if you want to sort by a field
    SORT ITAB by FIELD1.
    Sort by multiple fields.
    SORT ITAB by FIELD1 FIELD2..
    Regards,
    Ravi

Maybe you are looking for

  • MyFaces on OC4J 10.1.2.0.2 - JspParseException

    I just completed an application and it works fine at my test server (Win2003). Deploying the very same EAR-file at the production server went smooth, but calling any page returns the following error: 500 Internal Server Error OracleJSP: oracle.jsp.pa

  • Adobe ENCORE not included in CC?

    I have updated my CS6 apps to CC version (with few minor problems) on my both computers. Fine! Surprinsigly, there is no version nor update to ENCORE. Is it normal? ENCORE CC does'nt exist? Thx

  • Template from another template?

    I am building a website and I want to use template which will include navigation bar. When I change navigation bar in template, will it automatically change navigation bar throughout my site? Also, can I create templates from original template and wi

  • Why can't I just do this...

    I will be upgrading to a mac pro soon, and I was reading around on topics regarding itunes library transfer. Why can't I just drag my current user/music file to the user/music file on the new computer? I know I will be resetting all of my preferences

  • Client Certification for Sender SOAP Adapter

    I am trying to configure an incoming SOAP call to allow client certification for autentication and not ask for username/pwd. I already tried changing the configuration of the SOAP adater in visual admin to have the client certification module with no