Need to sort results in a report in descending order

Hi,
We have OIM 10g and we need to sort the report on date in descending order. I tried this code but still the column is not getting sorted.
Evertime I generate the report, the results are sorted only in ascending order.
Here the stored procedure code for sorting:
strOrderByClause := 'abc.date';
IF strsortorder_in = 'DESC' THEN
intSortDirection_in := 0;
ELSE
intSortDirection_in := 1;
END IF;
Please let me know if you have faced similar issue.
Thanks,
Kalpana.

Hi,
If Oracle can give you back the right sort order without any custom sorting,
that means you should be able to get the same results in WebI.
If the object that you pull from the universe is the wrong type (like numeric but you want it alphanumeric),
then you can either request you designer to give you an object with the right data type,
or you can change it by creating a report variable using
FormatNumber([original object],"0")
this will format the number to a number without leading zeroes, thousand separators or decimal point.
Now you can use the object as if it came from the universe.
So you can also use it on the x-axis of a chart.
Btw. you can also do a custom sort on the x-axis(as long as it is an object or variable, not a formula)
alternative, if you define a custom sort in a table block, you can state it should be used througout the document.
(so also in the charts.
Hope this helps,
Marianne

Similar Messages

  • Display the result of a query in descending order.

    Hello Experts,
    How can I display the result of a query in descending order?
    Thanks much in anticipation.
    Regards.

    Hi Kumar,
    If you want to display char in descending order, in the query designer set the sorting setting as desceing for that particular characteristics, or if you want to see the KF in descending order, create a condition on that KF and set as TOP N and set N as 999999, that would display your KF in descending order.
    - Danny.

  • Can you sort a multi value field in descending order on a BC?

    Hi
    We have a date field which is a multivalue field on our Enrolment BC. The field comes from our Attendance BC. The Enrolment BC has a one to many relationship with an Attendance BC.
    We would like to sort this date in descending order for use on the Enrolment BC. We tried this on the link using the associated list sort spec. However this did not work.
    The only way we could get the multi value field to sort by descending order on the Enrolment BC was to add a sort spec on the Attendance BC. That is Date (DESC).
    Is there any other to do this using configuration? We don't want to add a sort spec on the Attendance BC to do this. At the moment it looks we will need to use script on the Enrolment BC.
    Thanks for you help,
    Tim

    That is a good suggestion. It looks like we already have a couple of cloned "Attendance" BC's used by workflow / interfaces so maybe I can use one of these. Thanks!

  • Sorting a two dimensional array in descending order..

    Guy's I'm a beginning Java programmer. I've been struggling with finding documentation on sorting a two dimensional primitive array in descending order.. The following is my code which goes works, in ascending order. How do I modify it to make the list write out in descending order?
    class EmployeeTable
         public static void main(String[] args)
         int[][] hours = {
              {2, 4, 3, 4, 5, 8, 8},
              {7, 3, 4, 3, 3, 4, 4},
              {3, 3, 4, 3, 3, 2, 2},
              {9, 3, 4, 7, 3, 4, 1},
              {3, 5, 4, 3, 6, 3, 8},
              {3, 4, 4, 6, 3, 4, 4},
              {3, 7, 4, 8, 3, 8, 4},
              {6, 3, 5, 9, 2, 7, 9}};
         int [] total = new int [hours.length];
         for (int i = 0; i < hours.length ; i++){
              for (int j = 0; j < hours.length ; j++){
                   total[i] += hours[i][j];
         int[] index = new int[hours.length];
         sortIndex(total, index);
    for (int i = 0; i < hours.length; i++)
    System.out.println("Employee " + index[i] + " hours are: " +
    total[i]);
    static void sortIndex(int[] list, int[] indexList) {
    int currentMax;
    int currentMaxIndex;
    for (int i = 0; i < indexList.length; i++)
    indexList[i] = i;
    for (int i = list.length - 1; i >= 1; i--) {
    currentMax = list[i];
    currentMaxIndex = i;
    for (int j = i - 1; j >= 0; j--) {
    if (currentMax < list[j]) {
    currentMax = list[j];
    currentMaxIndex = j;
    // How do I make it go in descending order????
    if (currentMaxIndex != i) {
    list[currentMaxIndex] = list[i];
    list[i] = currentMax;
    int temp = indexList[i];
    indexList[i] = indexList[currentMaxIndex];
    indexList[currentMaxIndex] = temp;

    Bodie21 wrote:
    nclow all you wrote was
    "This looks to me like a homework assignment that you're asking us to solve for you. Your description of what it does isn't even correct. It doesn't sort a 2d array.
    You would probably elicit better help if you could demonstrate that you've done some work and have something specific that you don't understand."
    To me that sounds completely sarcastic. You didn't mention anything constructive besides that.. Hence I called you a male phalic organ, not a rear exit...Bodie21, OK, now you've got 90% of us who regularly contribute to this forum thinking your the pr&#105;ck. Is that what you wanted to do? If so, mission accomplished. Many will be looking for your name next time you ask for help. Rude enough for you?

  • Sort records in a csv file in the descending order of time created attribute

    I have an excel (.csv) file with the following column headers :-
    Client, 
    SourceNetworkAddress
    ,TimeCreated,
     LogonType
    ,User,
    Message
    Values like :- ABC, 10.5.22.27, 11/23/2014 9:02:21 PM, 10, testuser
    The file is a combination of a report generated everyday using multiple scripts. The data is appended each day therefore, I would like to sort the final output file in descending order of time created (a combination of date and time) fetched from events
    i.e. the latest record with the latest date and time should be at the top of the list.
    I tried using the following command however, I get a sorted list according to the date but not the time. The command does not consider the AM/PM mentioned in the time instead simply sorts them as per numbers 
    Import-Csv "C:\Users\a\Desktop\report.csv" | sort Timecreated -Descending | Export-csv "C:\Users\a\Desktop\report_sorted.csv" -force -NoTypeInformation
    So if I have a record with 9:02:21 PM(latest) and a record with time 10.44.10 AM on the same date, the command will sort the list with record 10:44:10 AM first and then record with 9:02:21 PM however it should be the opposite as per descending order.
    Kindly help !!

    Hi jrv,
    Thanks for your response. However, I get errors while I run this command in Powershell :-
    Import-Csv <file> | Select Client,SourceNetworkAddress,LogonType,User,Message,@{N='TimeCreated';E={[datetime]($_.TimeCreated)} | Sort TimeCreated -Descending | Export-csv <file> -force -NoTypeInformation
    Missing expression after ','.
    At line:1 char:150
    Unexpected token 'LogonType' in expression or statement.
    At line:1 char:151
    Unexpected token ',' in expression or statement.
    At line:1 char:160
    Unexpected token 'User' in expression or statement.
    At line:1 char:161
    Unexpected token ',' in expression or statement.
    At line:1 char:165
    Unexpected token 'Message' in expression or statement.
    At line:1 char:166
    The hash literal was incomplete.
    At line:1 char:174
    Please help!
    You are missing a second curly brace - 
    Import-Csv <file> | Select Client,SourceNetworkAddress,LogonType,User,Message,@{N='TimeCreated';E={[datetime]($_.TimeCreated)}} | Sort TimeCreated -Descending | Export-csv <file> -force -NoTypeInformation

  • Listview sorting in ascending / descending order

    Hello
    I am new to winforms
    What I want to do is when the user clicks on a listview control column the listview data should get sorted by that column in ascending / descending order
    Please help me 
    Thanks
    regds
    Manoj Gokhale

    There's an example at the following link.
    https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listviewitemsorter%28v=vs.110%29.aspx

  • Sort results on app or database side?

    I'd like to think that this is a bit trickier than it might first appear. We have some queries that use ORDER BY, and our database guy is telling us to take them out and do them on the web app side to cut down on Oracle 10g's use of the TEMP table. Here's an example of a frequently run query that populates a quick access select box of their address book entries:
    SELECT ReceiverID FROM ADDRESSBOOK WHERE AccountNbr = ? ORDER BY UPPER(ReceiverID)We realized that ORDER BY is probably redundant there since the pair key consists of the AccountNbr and ReceiverID, so since it'll use the index they'll come across already sorted. However, when you go searching, you have queries like this, and even more complicated ones as well:
    SELECT ReceiverID, CompanyName FROM ADDRESSBOOK WHERE AccountNbr = ? AND UPPER(CompanyName) LIKE UPPER(?) ORDER BY UPPER(CompanyName)In that case, we need to sort, either in the database or on the application side. Typically, the results per account number are around 200 or less, but sometimes it's in the thousands. I've always thought you're supposed to make the database do stuff like this, but if the database is having to go out to disk to use the TEMP table, then maybe in this case it could be better to sort the ResultSet in Java...I was happy to find out that String already has a Comparator for that, so you can write:
    Collections.sort(myList, String.CASE_INSENSITIVE_ORDER)However, on the main address book page, they see about five fields of each entry, and they can sort by any of the five fields. So, say the field they want to sort by is CompanyName. Then I'll have to put all the CompanyNames into a List and also into a HashMap where they're a key to the rest of the fields, and then sort the List and pull the CompanyNames out one by one to get the rest of the fields whose info needs to go on the same line on the webpage. In other words, this seems to be the reason for using ORDER BY on the database side in the first place, so please correct me if I'm wrong...

    You're not wrong. Databases are designed and optimized to do exactly what you're doing; a dba that tells you otherwise would be suspect in my opinion.

  • Using JavaScript need to Sort subsite site collection based on date in descending order

    Hi,
    Below is my code, where i need to sort the " webCollection
    = web.getSubwebsForCurrentUser(null)" web collection based on the web.get_created() in
    descending order. How could i do it any suggestions. Also i need it in JavaScript.
    <script src="/_layouts/15/sp.runtime.js" type="text/javascript"></script>
    <script src="/_layouts/15/SP.js"></script>
    <script type="text/javascript">
    var context = SP.ClientContext.get_current();
    var web = context.get_web();
    ExecuteOrDelayUntilScriptLoaded(getWebProperties, "sp.js");
        function getWebProperties() {
                    webCollection = web.getSubwebsForCurrentUser(null);
            context.load(webCollection)
            //ctx.load(this.web);
            context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
                Function.createDelegate(this, this.onFail));
        function onSuccess(sender, args) {
            //alert('web title:' + this.web.get_title() + '\n ID:' + this.web.get_id()
    + '\n Created Date:' + this.web.get_created());
            alert("Number of sites: " + webCollection.get_count());
                   var webEnumerator = webCollection.getEnumerator();
                    while (webEnumerator.moveNext()){
       var web = webEnumerator.get_current();
      alert("Title="+web.get_title() +"\n"+ "Created="+web.get_created());
        function onFail(sender, args) {
            alert('failed to get list. Error:'+args.get_message());
    //getWebProperties();
    </script>
    Thanks!
    MCTS- Please vote and mark posts as answered where appropriate.

    Hi,
    According to your post, my understanding is that you wanted to sort the subsite based on the date in descending order.
    You can refer to the following code snippets, it sorts the subsites by the date in descending order.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    // When the body is loaded, the onload event handler executes each function whose name is contained in this array.
    _spBodyOnLoadFunctionNames.push("callCSOM");
    function callCSOM()
    $("#Button1").click(function()
    ExecuteOrDelayUntilScriptLoaded(RetriveSites, "sp.js");
    var currentcontext = null;
    var currentweb = null;
    function RetriveSites()
    currentcontext = new SP.ClientContext.get_current();
    currentweb = currentcontext.get_web();
    this.subsites = currentweb.get_webs();
    currentcontext.load(this.subsites);
    currentcontext.executeQueryAsync(Function.createDelegate(this, this.ExecuteOnSuccess),
    Function.createDelegate(this, this.ExecuteOnFailure));
    function ExecuteOnSuccess(sender, args)
    var subsites = '';
    var enum1 = this.subsites.getEnumerator();
    var siteCreatedTime = '';
    var array=new Array();
    while (enum1.moveNext())
    var site = enum1.get_current();
    array.push(new Array(site.get_created(),site.get_title()));
    alert(array);
    array=sortMethod(array);
    alert(array);
    function sortMethod(arr) {
    var i, j, stop, len = arr.length;
    for (i=0; i<len; i=i+1)
    for (j=1;j<len - i; j++)
    // change the "<" to ">" would be sort by the Ascending.
    if (new Date(arr[j-1][0]) < new Date(arr[j][0]))
    //swap(j, j+1);
    var temp = arr[j-1];
    arr[j-1] = arr[j];
    arr[j] = temp;
    //alert(new Date(arr[j]));
    return arr;
    function ExecuteOnFailure(sender, args) {
    alert("error");
    </script>
    <input id="Button1" type="button" value="Run Code"/>
    Results:
    Sort before:
    Sort after:
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Jason Guo
    TechNet Community Support

  • How can I store the results of a report in an Oracle table ?

    In OBIEE 11g, we need the records resulting from the execution of a report, to be stored in an Oracle table.
    Is this possible ?. Thanks.
    F r a n c o . -

    GSR Hi, first of all thanks for your response.
    What I'm wanting to do is not exactly what you're proposing.
    What I want is that an end user can run a report and that the results be automatically stored in an Oracle table. Without manual intervention. Other BI products perform this action, and I need to do it with OBIEE. Thanks.
    F r a n c o . -

  • Dynamic sorting in Cross Tab Report

    I have 2 cross tabs in a report with element linking that filters data in 2nd report when I click on values in the first. I'd like a way to be able to sort the results in the 2nd cross tab in ascending or descending order dynamically.
    Please see image below (click image for better quality) for a detailed representation of the problem.
    Is this possible?

    Right click on crosstab and go to Crosstab Expert and in the columns click on "group options" button and in the options tab select "Use a formula as sort order" and write the condition like this
    if {?Parameter}="Ascending" then
    crAscendingOrder
    else
    crDescendingOrder
    Hope this helps!
    Raghavendra

  • Problem  in  specifing the intial sorting column of  a report

    hi
    we have a report based on a table with 6 columns in our home page .we display all the six columns as sortable.
    we also need to sort the contents of the report by 4th column by default when ever the user logs in ,but what happens is ,report gets sorted automatically depening upon the previous sorting column selected
    is there any way of telling htmldb to sort the report by 4th column ..
    many thanks
    S.Jawahar

    hi ,
    this infotype has a interesting solution . In my case it was  for US country .
    We select the veteran status and this is field P0077-VETST  which is stored in DB table .
    Now based on this value and the molga of that pernr  we need to look at the T5UVT table for the combinations avaliable for MOLGA AND  VETST .
    Based on the config's of this table the screen values are getting populated .
    It dosent allow any combinations and the picked values are passed to the screen for fields Q0077-VETS1 VETS2 VETS3 VETS4 .
    Br,
    Vijay.

  • Sorting a KF in report

    Hi,
    I have a report where I need the report to be sorted on a KF when the report is loaded FIRST TIME.
    Please let me know how to acheive that ?

    Hi rvn,
    One way to do that is to create a condition using TOP N and use a very big data value in N, like 999,999,999. If you use TOP N, then the report will be sorted on this KF in Descending order on the execution of the query.
    Or you can also set the property in the workbook and save it.
    Hope this helps...

  • I need to run a clean scan report on my os x mac purchased in oct 2006. Can anyone help me with a software that is available to do this? Thanks Madhumann

    I need to run a clean scan report on my os x mac purchased in 2006.
    Can anyone help me identify a software that will do this?
    Thanks Madhumann

    clean scan report
    What do you mean by this?  What results are you looking for?  List some of the results you would see in the report.
    Are you saying you want to check the hd for problems?
    Verify a disk
    As an alternative, you can verify that the filesystem on the disk is correct. You will not be able to repair the file system.
    I suggest that you use disk utility to verify that your startup disk is OK. 
    Macintosh-HD -> Applications -> Utilities -> Disk Utility 
    Start up disk utility.  On the left pane view, you will see a list of all your disks.  
    Click on your startup disk.
    Click on the First Aid  Tab.
    Click on verify.  
    Hopefully your disk will verify.  If not, you have to boot from your installation DVD and run Disk Utility from there to attempt to repair your file-system.
    Robert

  • Using results of other reports of a Dashboard

    Hi there,
    i've created a Dashboard with some requests on it.
    Now i want to use the result of a report to do calculation on a further report.
    Is it possible to save the result of a report in a variable or is there any other way to use the result of a report in another Report?
    Thanks,
    Frank

    Thanks wildmight for your suggestion,
    the thing is that I can't create calculated columns on BMM because the results are calculated with subqueries.
    I need to do a calculation like
    z = x * y
    x := count of Customers who have bought Product1 and not Product2 (calculated with subqueries)
    y := average Revenue of Product2
    Product1 and Product2 are prompted
    I dont know how I could calculate this two statements in one report.
    Regards,
    Frank

  • Need to sort a query 3 times

    Hi,
    I am writing a query as follows:
    SELECT
    GEM_MST.GEMID,
    GEM_MST.LOTID,
    GEM_MST.ASSORTPKTNO,
    GEM_MST.GEMPACKID,
    GEM_MST.S_SHAPEID,
    CO.COLORNAME,
    CL.CLARITYNAME,
    GEM_MST.S_CARATS,
    SUR_PARAM.PRICECT,
    GEM_MST.S_CARATS * SUR_PARAM.PRICECT S_PRICE,
    MUM_PARAM.M_PRICE,
    CARAT * MUM_PARAM.M_PRICE M_PRICE,
    GEM_MST.FACTORYPRICE,
    TAG.TAGID
    FROM
    GEM_MST GEM_MST,
    TAG_GEM_MAPPING TAG,
    GEM_SURAT_PARAMETER SUR_PARAM,
    GEM_MUMBAI_PARAMETER MUM_PARAM,
    COLOR_MST CO,
    CLARITY_MST CL
    WHERE GEM_MST.GEMID = TAG.GEMID
    AND GEM_MST.GEMID = SUR_PARAM.GEMID
    AND GEM_MST.GEMID = MUM_PARAM.GEMID
    AND GEM_MST.S_COLORID = CO.COLORID
    AND GEM_MST.S_CLARITYID = CL.CLARITYID
    AND GEM_MST.S_COLORID = CO.COLORID
    AND MUM_PARAM.ACTIVEFLAG = 'Y'
    AND TAG.ISACTIVE = 'Y'
    AND TAG.TAGTYPE = 'S'
    AND TAG.TAGID = 2
    ORDER BY GEM_MST.S_CARATS DESC;
    As per requirement, i need to sort this query as first on GEM_MST.S_CARATS DESC,
    On the sorted result sort on co.QUALITYORDER ASC,
    and On the sorted result sort on CL.QUALITYORDER ASC
    I have tried :
    ORDER BY GEM_MST.S_CARATS DESC, co.QUALITYORDER ASC,CL.QUALITYORDER ASC
    But its not giving expected result as i require.
    Please do the need full help.
    Thanks in advance.
    Would appreciate your prompt response.
    Regards,
    Vishal
    Edited by: vishal.p on Sep 22, 2010 7:02 AM

    This forum is meant for discussions related to database installs. Pl re-post in a more appropriate forum such as PL/SQL
    HTH
    Srini

Maybe you are looking for

  • DBMS_SQL array processing - ORACLE 8.0.6

    It's been a while since I've used this. DEFINE_ARRAY - the last parameter is "lower bound", which is the starting point. If it's set to 1, rows will be placed in the array starting with 1 and ending with the last row fetched. The entire result set fr

  • How to convert .ppp file to .kfp

    Hi All, I need to preflight the pdf document. I am having .ppp file but not pitstop professional. In this case how can i convert .ppp (pitstop preflight profile) extension file to .kfp extension file? I am currently using Acrobat Professional 9.0. Th

  • Sorting photos inside events

    Still wondering whether it is possible to sort photo's within events (manually). The I Photo Help says the following... **Sort photos (regardless of Event): Select Photos in the Source list, choose View and make sure Event Titles is unchecked, and th

  • Deleting orders from Live Cache

    Hi Gurus, Is there any way where we can delete orders directly from Live cache? I have a situation where Process orders are present in R/3 and not available in APO. It shows up in the CCR report, but when we push them it gets stuck in the queue with

  • How much memory to add to 5 yr. old MacBook Pro that already has 2 gb

    I thought I heard somewhere that I could add 2 x 2gb memory in the slots that have 1 gb x 2 in there right now.  However, now I'm hearing that my macbook will only use 3 gb of that.  By any chance is it 3 + anything - if so I'll go ahead & get the to