Changing default sort direction

Hi there
The standard table analysis item that can be included in a template comes with functionality whereby a user can sort the data. The default sort direction is ASCENDING.
It is now my task to determine how to make that DESCENDING ... any ideas on how the default / initial sort direction can be altered?
Cheers,
Andrew

Hi Andrew,
maybe make the sort direction of the query DESCENDING.
regards,
Raymond Baggen
Uphantis bv

Similar Messages

  • How do you Change Group Sort Direction using Report Client

    It looks like there should be a sort direction property on the ISCRGroupOptions object but there is none. So how do you set the sort direction of the group?

    I tried that and it did not work. Here's the code to change the grouping, note I also change the associated sort object. I did notice that if you go into the crystal reports designer and bring up the Record Sort Export and select the group's corresponding sort that the Sort Direction radio buttons are disabled. The question is how to change the sort direction shown on the Change Group Options dialog?
            public bool GroupModify(short GroupIndex, string TableName, string ColumnName, SortDirection SortDirection)
                bool result = false;
                if ((_ReportClient != null) && (GroupIndex >= 0) && (GroupIndex < this.GroupCount()))
                    CrystalDecisions.CrystalReports.Engine.Group docGroup = _ReportDocument.DataDefinition.Groups[GroupIndex];
                    ISCRField field = _ReportClient.DataDefController.FindFieldByFormulaForm(docGroup.ConditionField.FormulaName);
                    if (field != null)
                        Group group = _ReportClient.DataDefController.GroupController.FindGroup(field);
                        if (group != null)
                            Group newGroup = group.Clone();
                            newGroup.ConditionField = FieldGet(TableName, ColumnName);
                            if ((newGroup.ConditionField != null) && (_ReportClient.DataDefController.GroupController.CanGroupOn(newGroup.ConditionField)))
                                _ReportClient.DataDefController.GroupController.Modify(group, newGroup);
                                result = this.SortSet(TableName, ColumnName, SortDirection);
                return result;
            public bool SortSet(string TableName, string ColumnName, SortDirection SortDirection)
                bool successful = false;
                if (_ReportClient != null)
                    ISCRField field = FieldGet(TableName, ColumnName);
                    if (field != null)
                        ISCRSort sort = _ReportClient.DataDefController.SortController.FindSort(field);
                        if (sort != null)
                            _ReportClient.DataDefController.SortController.ModifySortDirection(sort, CRSortDirection(SortDirection));
                return successful;
            public int GroupCount()
                int count;
                if (_ReportClient != null)
                    count = _ReportClient.DataDefController.DataDefinition.Groups.Count;
                else
                    count = 0;
                return count;

  • Change Default Sort Logic Of ADF Table?

    Hello All,
    In my application is an ADF table with lots of rows. The default sort logic for one of the columns is from 'Oldest to Newest'. The user has to click on the sort again to get 'Newest to Olderst'. This takes away a lot of time.
    How can I change the default sort logic to 'Newest to Oldest' ?
    Thanks,

    Is this jdeveloper 11.1.1.2?
    What is the problem with the normal scenario - just add 'order by' the view object clause?
    The table offers ascending and descending ordering.

  • How can I change the sorting direction of Events in Photos?

    How can I change the date Sort "direction" in Photos for the iPhoto Events folder?  Unlike iPhoto, which sorted the older photos at the top, Photos does the reverse.  Can this be modified?

    >System Preferences>Hardware>Mouse>Point & Click>Scroll Direction.

  • Change the sort order (ascending/descending) based on parameter field

    I have created a formula on a subreport to change sorting based on variables.
    select {?Pm-@Sorting}
    case "property_type_desc ASC" :
    {owned_property.property_type_desc}
    case "property_type_desc DESC" :
    {owned_property.property_type_desc}
    default:
    ({owned_property.property_type_cd}; )
    how can I change the sort order ascending and descending using the formula??
    Thanks, Jessica

    Try this
    1. Create a parameter with 2 default values in the picklist: Descending and Ascending.
    NOTE:
    In Crystal Reports version 5 or 6, it is not possible to have a pick a parameter value from a list. The user must enter a specific value, guided by the prompting text. For example : To Sort in Ascending order type A, to sort in Descending order type D.
    u2022 On the 'Insert' menu, click 'Parameter', then click 'New'.
    u2022 Type the name and prompting text for the parameter in the corresponding boxes.
    u2022 In the 'Type' box, click 'String'.
    u2022 Click 'Set Default'.
    u2022 In the 'Value to add' box, type 'Descending' then click '>' to move it to the 'Default Values' list.
    u2022 Repeat the above step for 'Ascending'.
    u2022 Click 'OK', then click 'OK' again to return to the report.
    2. Create 2 formulas based on the field you want to change the sort direction on:
    u2022 On the 'Insert' menu, click 'Formula', then click 'New'.
    u2022 Create this formula:
    @Asc
    If {?Parameter} = "Ascending" then
    u2022 Save this formula and close the Formula Editor. This brings you back to the Formula tab of the Insert Fields dialog box.
    u2022 Click 'New' and create this formula:
    @Des
    If {?Parameter} = "Descending" then
    u2022 Save this formula and close the Formula Editor.
    u2022 Click 'Close' to return to the report.
    4. Sort the report based on these two formulas.
    u2022 On the 'Report' menu, click 'Sort Records'.
    u2022 In the 'Report Fields' list, click {@Asc} and move it to the 'Sort Fields' list.
    u2022 Under 'Sort Direction', click 'Ascending'.
    u2022 In the 'Report Fields' list, click {@Des} and move it to the 'Sort Fields' list.
    u2022 Under 'Sort Direction', click 'Descending'.
    u2022 Click 'OK' to return to the report.
    Once you preview the report you will be prompted to select a parameter value, which will determine how the report is sorted.
    Regards,
    Raghavendra

  • Changing group sort programmaticaly

    Is there a way to change or create a "group sort" formula from vb.net 2005? I am using Crystal reports XI R2.
    I need to be able to sort by ItemID, Qty, Amount or Volume, create the sort formula and be able to change the sort direction also.
    I tried to use:
                Dim crSortField As SortField
                Dim fieldDef As DatabaseFieldDefinition
                For Each crSortField In cr.DataDefinition.SortFields
                    fieldDef = cr.Database.Tables(0).Fields(crSortField.Field.Name.ToString)
                    crSortField = cr.DataDefinition.SortFields(1)
                    crSortField.Field = fieldDef
                    crSortField.SortDirection = SortDirection.DescendingOrder
                Next
    I get an error that says: The sort is not defined in the data definition.
    Any help would be appreciated.

    Here is a sample I had kicking around.
    Keep in mind that you must have at least one sort already set up to be able to change it. Otherwise you'll need to use the RAS SDK to add sorts at runtime.
              private void Form1_Load(object sender, System.EventArgs e)
                   ConfigureCrystal();
              private void ConfigureCrystal()
                   // Instantiate and load the Sort Report.rpt
                   crReportDocument = new ReportDocument();
                   crReportDocument.Load(Application.StartupPath + "\\..\\..\\Sort Report.rpt");
                   // Change the sorting for the group to sort based on the summary
                   // of @Order Amount x Tax.
                   SortFields crSortFields = crReportDocument.DataDefinition.SortFields;
                   foreach(SortField crSortField in crSortFields)
                        if (crSortField.Field.Name == "Count ({Orders.Order ID}, {Customer.Customer ID})")
                             // Get the new field to sort on
                             FieldDefinition crFieldDefinition = crReportDocument.DataDefinition.SummaryFields[1];
                             crSortField.Field = crFieldDefinition;
                             crSortField.SortDirection = SortDirection.DescendingOrder;
                             break;     // break out of the foreach loop
                   // Change the sorting for the record type as well
                   foreach(SortField crSortField in crSortFields)
                        if(crSortField.Field.Name == "Order ID")
                             FieldDefinition crFieldDefinition = crReportDocument.Database.Tables[1].Fields[1]; // the Order Amount in in the 2nd table and 2nd field
                             crSortField.Field = crFieldDefinition;
                             crSortField.SortDirection = SortDirection.DescendingOrder;
                             break; // break out of this foreach loop
                   // Set the ReportSource of the CrystalReportViewer control
                   crystalReportViewer1.ReportSource = crReportDocument;
              private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
                   // clean up
                   crReportDocument.Close();
                   crReportDocument.Dispose();
                   crReportDocument = null;

  • How to change the default sorting in iTunes

    Hi,
    Does anyone know how to change the default sorting method for all items in iTunes?  I use the third option for organizing the library as a whole (the one that has a list of icons for bands that you double click to show only that band's songs).  The only sorting method I use is to sort by Album by Year (ascending), this makes the most sense to me.  I can tell that iTunes is attempting to remember when I do this for certain artists, but it epically fails at maintaining this sorting pattern.
    To be clear, say I open Radiohead and click through to have it sort with the above method.  Everything works great, but when I return a few days later to play Radiohead again, the sorting is not maintained.  It could be as simple as sorting in a descending direction, or could even be trying to sort by the number it was added in my library.
    I'd really appreciate it if someone knew of a way (maybe even through scripts if possible / the only solution) to eliminate this problem and have every (NOT just the artists who I've told iTunes to sort a specific way) artist sort that way.
    I don't know if my copy is just corrupt?  It may be, since for some artists it's started playing them in the above mentioned order they were added to my library even if I force a sort by album by year (i.e. it will go from playing a 2007 album to a 2002 album and not the 2008 album).
    Thanks!

    Andrew, I know I am extremely late to the party but I too use Grid View.  I had the same problem that you had but have found this to work for me.  I used it and it is still holding as my default sorting even after switching between the Artist page and Grid View.
    Once you are inside of the Artist page continue to click on the Album column until it shows Album by Artist/Year.
    That will give you each album sorted by the year instead of it randomly sorting it for you each time you leave an Artist's page and then back again.
    Hope this helps.

  • How do I change the default "sort by" on import?

    I've been pouring over the forums for a few minutes with minimal success... It seems many people are set on ranting rather than looking for solutions.
    I'm finding that I can import photos easily, but upon import (in the library grid view), I have to then switch the sort-by from "import order" to my preferred sequence of "file name".
    Is there a way to change the preferences so that the default sorting order of a newly imported batch of photos is "file name" (or anything else for that matter)? I feel clueless for not being able to find such a setting.
    Thanks for the help in advance!
    -Cody

    @ Ian: thanks for the message, I was afraid that might be the case. It's not generally a bother, but from time to time, my pictures show a sequence of things and it's just plain silly that LR imports with the default being whichever order LR decides to import in.
    @ John: I generally import photos from a SD card inserted into my computer, so it just imports it via the default dialog. From looking at the freshly imported gallery, it generally shows that the sort order = "Import order" rather than by filename/capture time.

  • Want to change the default sort order of a Advanced table

    Hi all ,
    Hope all of you doing good.
    I am trying to change the deafult sort order of a " View Applicants" advanced table on Irecruitment selfservice page , using personalization feature but its not sorting as expected.
    The default sort order is asc by the name of the applicants. I wanted to override it by " Date Applied " desc using personalizing the advanced table.
    But its not sorting by Date applied and still shows the sort by applicant name.
    Any inputs will be greatly helpful
    I am using the Oracle Apps 11.5.10 version.

    Hey guys m I got the answer for the below question.
    Oracle have few Restriction and limitation on such Advanced table in sorting the data,
    Few of them are as mentioned below ...
    1. Sorting is not allowed for tables that allow inserts.
    2. Sorting is not supported for tables containing updateable columns
    3. Sorting is disabled when the Select column is checked for a row in a table or when Hide/Show is present in a table.
    Because of the above limitations , we cannot sort or override the existing alphabetical name sort order to Date applied sort order on the View Applicant advanced table.
    You can observe that , View Applicant page is having an option called "Update Status" which allow us to update applicant’s status or rating in the Advanced table.
    On such updatable advanced tables, oracle does not allow us to override the sort order on any of the table columns.
    Keeping it in a nutshell , I can say it's does not allow us to change the sort order of the view applicant advanced table ( which is having updateable columns ) to sort them in Date applied instead of Name( which is default ).

  • How can i change the default sort Arrow Color in the datagrid?

    How can i change the default Sort Arrow Color in the
    datagrid? i didnt found any style properties to change the sort
    arrow color, i know it can be do it in flex 1.5 but how to do it in
    flex2?

    Type about:config in the address bar. Find browser.download.dir and change it to the path you want. Remember that Android has a linux base so the path will similar to /mnt/sdcard/downloads/

  • Default sorting order used by oracle

    Can anyone please let me know whether oracle uses any default sort order or not when executing an sql which does not have any sort order/ order by clause?
    I have a sql query where no sort order is specified.
    Now if I add some more columns in the select clause and execute the same query, the number of records returned are same and also the records are same.
    But the order in which they are displayed is different from the previous query.
    Could anyone please let me know whether oracle uses any default sort order or not when executing an sql which does not have any sort order/ order by clause
    or does it depend on the columns of the table?
    Thanks in advance.

    To answer your direct question "why the order in the previous example differ".
    When you added additional columns to the select list, that changed the query plan generated for the query. This caused Oracle to pick up the rows in a different order. There are a number of reasons this could happen, the new selected columns caused a different index (or no index) to be used for one of the tables in the query, it caused a different table to be be used as the "driving" table (i.e. the first one accessed), it caused a different join method to be used.
    HTH
    John

  • How to change default FCoE QoS class - Nexus 5020

    I see that on a Nexus 5020, the default FCoE QoS class is 50%. I am not using FCoE so I would like to adjust this value to 0%. I switch complains and says I can't change default values. How should I go about getting around this to eliminate the FCoE queue and give 100% BW to default? Thanks.

    No. The default classloader is a builtin classloader in
    the JRE. You can use other classloaders.
    The java.net.URLClassLoader is provided in
    the JDK. That's the only one. Otherwise you
    should subclass ClassLoader and implement
    the loadClass method (f.i.
    loadClass("my.program") {
    String file="my.program".replace('.','/') + ".class";
    // find the file in classpath
    // read the class file in a byte[]
    return defineClass(byte[]);
    although this is not the advised way to do it. Search the web for how to implement a classloader directly.

  • How to change default save as location

    hi,
    how to change default save as location in acrobat 7.0?

    Why is Acrobat involved in this process at all? Why don't you save directly the pdf from your email program directly where you want it to be? Acrobat is just adding another step to this process.

  • How to change default selection in compensation planning

    Hi experts,
    We have upgraded our portal to EHP1 sp04.
    I need to change the default selection which it currently shows in "Employee Selection" under
    Compensation Planning-->Compensation Planning.
    When a user clicks on Compensation Planning>Compensation PLanning> he comes in an iview with 4 steps:
    There is one "Employee Selection" scroll down view, I need the default to be "Direct Reports"
    http://rapidshare.com/files/308150359/DirectReports.jpg
    The default it shows is "Employees from organizational units", I need to change it to "Direct reports". Can someone tell me how I should proceed about it.
    Please guide me
    Regards,
    Rajat Sharma

    Hi,
    I have solved this issue.
    Go into SPRO>integration with other sap system>business packages>mysaperp>organizational structure view
    group organizational structure view.
    select mss_ecm_sel and change the nos. accordingly.
    thanks,
    Rajat

  • Set Default Sort in File Manager

    Hi,
    When i go to File Manager, Media Card, Photos, the default "sort" is set to Name and "order" Ascending. If i want to change it to "sort" date and "order" descending, i select date and then it jumps back to the actual pictures. I have to go back into the menu to do the second selection "sort" descending". So can the development team create an option where you change all the settings first and then you save them which then brings you back to the actual pictures? And also look into the option of remembering your preferred sort/order preferences? because once you go out of file manager and go back in, you have to do these steps again. 
    if I am overlooking this feature (maybe it's already a setting somewhere which i missed) feel free te let me know.
    Thanks

    Hi,
    It's not about set of key field in MDM Import Manager but the reason is that you can not select more than 1 category(Lookup Taxonomy) in maintable for one record. thats why error is coming because for this Property Multi-valued always No.
    Even, you can try this in Data Manager manually create three Category A, B and C in taxonomy mode on selecting Sub table Categories, then on selecting main table, when you select category field(which is lookup to categories table)for a particular record you could able to select only one category A, B or C.
    i would suggest make a Attribute of type text having three values A, B and C and mark this as Multi-Valued in Attribute Detail and link this Attribute with your category. in this way you can attach three values A, B and C with your Record.
    Other thing you can do,make this category field as (Lookup Hierarchy not lookup taxonomy) in main table to Subtable(Hierarchy) then for this field in main table you can set Property Multi-valued = Yes in MDM console and then after Import using MDM Import Manager finally only one record will get created in Data Manager as:
    Name Category
    1         A;B;C
    Hope it will Help you,
    Rewards if Useful.....
    Mandeep Saini
    Edited by: Mandeep Saini on Jun 20, 2008 8:46 AM

Maybe you are looking for