Sort doesn't work

BI Publisher 11.1.1.5.0
Validate template option returns "No Error found."
RTF Template
<?for-each-group:ROW;./ORDER?><?sort:current-group()/N;'ascending';data-type='number'?><?sort:current-group()/ORDER;'ascending';data-type='text'?><?N?><?ORDER?><?end for-each-group?>XML
<?xml version = '1.0' encoding = 'utf-8'?>
<ROWSET>
<ROW>
<N>1</N>
<ORDER>ORDER1</ORDER>
</ROW>
<ROW>
<N>2</N>
<ORDER>ORDER3</ORDER>
</ROW>
<ROW>
<N>1</N>
<ORDER>ORDER2</ORDER>
</ROW>
</ROWSET>Result
1ORDER2
1ORDER1
2ORDER3Wanted result
1ORDER1
1ORDER2
2ORDER3Am i doing something wrong?
Thanks in advance,
Igor
Edited by: svms on 07.09.2012 16:55

Thanks for the reply but it still not working as I want.
Here is new XML
<?xml version = '1.0' encoding = 'utf-8'?>
<ROWSET>
<ROW>
<N>5</N>
<ORDER>ORDER4</ORDER>
</ROW>
<ROW>
<N>1</N>
<ORDER>ORDER2</ORDER>
</ROW>
<ROW>
<N>2</N>
<ORDER>ORDER3</ORDER>
</ROW>
<ROW>
<N>1</N>
<ORDER>ORDER5</ORDER>
</ROW>
<ROW>
<N>3</N>
<ORDER>ORDER1</ORDER>
</ROW>
</ROWSET>Your code returns
3ORDER1
1ORDER2
2ORDER3
5ORDER4
1ORDER5I want these 5 groups were in following order
1ORDER2
1ORDER5
2ORDER3
3ORDER1
5ORDER4Regards,
Igor

Similar Messages

  • APEX_ITEM report - SORT doesn't work

    Hi,
    For the following report, the SORT doesn't work. I've also tried with the "Report Attributes", but same result. Does someone know is there a way to make it sorted or can confirm it's not possible.
    Thanks.
    SELECT
    APEX_ITEM.CHECKBOX(11,id_cc_delai_recueil) id_cc_delai_recueil,
    APEX_ITEM.HIDDEN(12,id_cc_delai_recueil)||APEX_ITEM.HIDDEN(13,id_cc_regle)||APEX_ITEM.TEXT(14,numdelai,3) numdelai,
    APEX_ITEM.SELECT_LIST_FROM_LOV(15,typedoss,'DOSSIERS OU DOCUMENTS',NULL,'NO') typedoss,
    APEX_ITEM.TEXT(16,suppdoss,3) suppdoss,
    APEX_ITEM.SELECT_LIST_FROM_LOV(17,rem_suppdoss,'REMARQUE_DELAI',NULL,'YES','','') rem_suppdoss,
    APEX_ITEM.TEXT(18,perioactif,3) perioactif,
    APEX_ITEM.SELECT_LIST_FROM_LOV(19,rem_perioactif,'REMARQUE_DELAI',NULL,'YES','','') rem_perioactif,
    APEX_ITEM.TEXT(20,periosmact,3) periosmact,
    APEX_ITEM.SELECT_LIST_FROM_LOV(21,rem_periosmact,'REMARQUE_DELAI',NULL,'YES','','') rem_periosmact,
    APEX_ITEM.SELECT_LIST_FROM_LOV(22,dispoinact,'DISPOSITION1',NULL,'NO') dispoinact,
    APEX_ITEM.SELECT_LIST_FROM_LOV(23,rem_dispoinact,'REMARQUE_DELAI',NULL,'YES','','') rem_dispoinact
    FROM
    cc_delai_recueil
    WHERE id_cc_regle = :P52_ID_CC_REGLE
    ORDER BY
    3,
    2

    Paulo,
    Remove the Order By clause from your Select statement and then use the Report Attributes to determine your sort order.
    Jeff

  • Function adobeDPS.libraryServices.folioMap.sort doesn't work

    Hi, I'm working with custom storefront and until yesterday the function folioMap.sort works fin, I get all folios published with this function, but today it doesn't work, I get always a empty array and my library looks like this:
    And if i debugger it I found that my folios is always an empty array:
    What am I doing wrong?

    Hi Neil, Thank you four your answer.
    Yes, I'm updating library. This is my code:
    adobeDPS.initializationComplete.add(function(){
      Store.init();
    Store.init = function(){
         var transaction = adobeDPS.libraryService.updateLibrary();
         transaction.completedSignal.addOnce(Store.updateLibraryHandler, this);
    Store.updateLibraryHandler = function(transaction){
         Store.folios = [];
           // Sort the folios descending.
           var list = adobeDPS.libraryService.folioMap.sort(function (a, b) {
           if (a.publicationDate < b.publicationDate)
                return 1;
           else if (a.publicationDate > b.publicationDate)
                return -1;
           else
                return 0;
    //HERE Store.folios always is empty
    Thank you very much.

  • Can someone help me why this quick sort doesn't work

    public class QuickSortII {
         static void sort(int a[], int lo0, int hi0) {
            int lo = lo0;
            int hi = hi0;
            if (lo >= hi) {
                return;
            int mid = a[(lo + hi) / 2];
            while (lo < hi) {
                while (lo<hi && a[lo] < mid) {
                    lo++;
                while (lo<hi && a[hi] >= mid) {
                    hi--;
                if (lo < hi) {
                    int T = a[lo];
                    a[lo] = a[hi];
                    a[hi] = T;
            if (hi < lo) {
                int T = hi;
                hi = lo;
                lo = T;
            sort(a, lo0, lo);
            sort(a, lo == lo0 ? lo+1 : lo, hi0);
        static void sort(int a[]) {
            sort(a, 0, a.length-1);
         static public void main(String[] args) {
              int a[] = new int[20];
              a[0] = 18;
              a[1] = 11;
              a[2] = 12;
              a[3] = 4;
              a[4] = 20;
              a[5] = 5;
              a[6] = 1;
              a[7] = 3;
              a[8] = 16;
              a[9] = 8;
              a[10] = 7;
              a[11] = 17;
              a[12] = 9;
              a[13] = 6;
              a[14] = 19;
              a[15] = 2;
              a[16] = 13;
              a[17] = 15;
              a[18] = 10;
              a[19] = 14;
              sort(a);
              for (int j = 0; j < 20; j++) {
                   System.out.print(a[j] + " ");
    }it doesn't sort the list

    it doesn't sort the list Please explain why you think it should. Doing so will help you understand the code.
    ~

  • Std::list::sort() doesn't work with custom class

    The following example doesn't order a list the way I'd expect. Is this being done wrong? Sun Studio 12 (not update 1). Current patches as of Monday.
    #include <list>
    class CMyClass
    public:
    CMyClass(long a) : m_Sec(a) { }
    bool operator<(const CMyClass* rhs)
    return (m_Sec < rhs->m_Sec);
    long m_Sec;
    typedef std::list<CMyClass*> TLogList;
    int
    main(int argc, char* argv[])
    TLogList logList;
    CMyClass* name = new CMyClass(0x4A833E79);
    logList.push_back(name);
    name = new CMyClass(0x4A85E144);
    logList.push_back(name);
    name = new CMyClass(0x4A85E66F);
    logList.push_back(name);
    name = new CMyClass(0x4A85E66F);
    logList.push_back(name);
    name = new CMyClass(0x4A85B2C2);
    logList.push_back(name);
    name = new CMyClass(0x4A85D6EF);
    logList.push_back(name);
    name = new CMyClass(0x4A69F9AD);
    logList.push_back(name);
    name = new CMyClass(0x4A85DC92);
    logList.push_back(name);
    name = new CMyClass(0x4A817316);
    logList.push_back(name);
    name = new CMyClass(0x4A85DEEB);
    logList.push_back(name);
    name = new CMyClass(0x4A846329);
    logList.push_back(name);
    name = new CMyClass(0x4A85E39D);
    logList.push_back(name);
    name = new CMyClass(0x4A85D41D);
    logList.push_back(name);
    name = new CMyClass(0x4A89CC17);
    logList.push_back(name);
    name = new CMyClass(0x4A85DC19);
    logList.push_back(name);
    logList.sort();
    TLogList::iterator logListIter = logList.begin();
    TLogList::iterator logListEnd = logList.end();
    for (; logListIter != logListEnd; ++logListIter)
    CMyClass* name = *logListIter;
    cout << hex << name->m_Sec << endl;
    return 0;
    which produces
    4a833e79
    4a85e144
    4a85e66f
    4a85e66f
    4a85b2c2
    4a85d6ef
    4a69f9ad
    4a85dc92
    4a817316
    4a85deeb
    4a846329
    4a85e39d
    4a85d41d
    4a89cc17
    4a85dc19

    The program as you wrote it will sort the contents of the list. The list consists of the addresses of CMyClass objects, and after sorting, will contain those addresses in sorted order.
    If you want to sort by the contents of the classes that are pointed to, you need to provide a comparison operator that compares the contents, and use the other form of the list::sort function that takes a comparison function as an argument. That is, add the function
    bool comp(const CMyClass* l, const CMyClass* r)
       return l->m_Sec < r->m_Sec;
    }and change
    logList.sort(); to
    logList.sort(comp); This version of list::sort will not compile using the default libCstd, because it requires member templates in the library implementation. For more information about this limitation, refer to the C++ FAQ section on library compatibility.
    [http://developers.sun.com/sunstudio/documentation/ss12u1/mr/READMEs/c++_faq.html#LibComp]
    The revised code will compile with the optional STLport library, or with other 3rd-party libraries like Apache stdcxx. To use STLport, add the option -library=stlport4 to every CC command, compiling and linking. You cannot mix code compiled for the default libCstd with STLport code in the same program.

  • Descending sort  doesn´t work

    I use a report with 10 columns. One should be sorted in descending order.
    But the Option "Sort Sequence 1 desc" dosn´t work as I aspect:-)
    Does anybody uses this Option?
    Thanks
    Marco

    Marco,
    That option specifies the default sorting. Once you sorted a report by clicking on a storable header, you’re setting a preference. That means whenever you return to that report, it’s sorted by your last sort setting. And that preference is persistent and tied to your user, not your session. If you want to reset the report, you could purge your preferences in the Application Express administration. You should then see the expected results.
    Regards,
    Marc

  • Creating a script for a PRIMARY KEY USING INDEX SORT doesn't work

    Probably a bug.
    h1. Environment
    Application: Oracle SQL Developer Data Modeler
    Version: 3.0.0.655
    h1. Test Case:
    1. Create a new table TRANSACTIONS with some columns.
    2. Mark one of numeric columns as the primary key - PK_TRANSACTIONS.
    3. Go to Physical Models and create new Oracle Database 11g.
    4. Go to Physical Models -> Oracle Database 11g -> Tables -> TRANSACTIONS -> Primary Keys -> PK_TRANSACTIONS -> Properties:
    a) on General tab set Using Index to BY INDEX NAME
    b) on Using Index tab choose a tablespace
    c) on Using Index tab set Index Sort to SORTED.
    5. Export the schema to DDL script. For the primary key you will get something like this:
    ALTER TABLE TRANSACTION
    ADD CONSTRAINT PK_TRANSACTION PRIMARY KEY ( TRAN_ID ) DEFERRABLE
    USING INDEX
    PCTFREE 10
    MAXTRANS 255
    TABLESPACE TBSPC_INDX
    LOGGING
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    ) SORTED
    h1. Reason of failure
    The script will fail because SORTED is not allowed here. It should be SORT.
    Additionally, the default behaviour for Data Modeler is to set Index Sort to NO but default setting for Oracle database 11g is SORT. Shouldn't Data Modeler use SORT as the default value?
    Edited by: user7420841 on 2011-05-07 03:15

    Hi,
    Thanks for reporting this problem. As you say, it should be SORT rather than SORTED. I have logged a bug on this.
    I also agree that, for consistency with the database default, it would be better to have SORT as the default in Data Modeler.
    David

  • Yosemite mail mailbox alphabetical sort doesn't work

    Why am I having trouble getting one mailbox into proper alphabetical order, and how can I fix it? It moved a mailbox to end of list, and I can't move it back w/o a lot of trouble, involving possible loss of the mailbox & subfolders along w/ it.

    so I was on the phone to AppleCare on another matter... and I thought I'd get this one looked at...  and SOLVED!
    I was initially told by first support that they hadn't heard of this issue, so I pointed out this wasn't something new to Yosemite and has gone back years in OSX mail in my experience. A supervisor was put on the phone.
    we started with the smaller of two Gmail IMAP accounts:
    BACKUP BACKUP BACKUP <<< don't say I didn't warn you!
    tried the un-enable/re-enable again... to no avail
    then we opted to un-enable and add the Account again using the Mail/Preferences pane (didn't resolve the issue).
    Then mail did something a little odd. On deletion of this replicated Gmail IMAP account it removed BOTH copies of that account!
    But when we re-added it again, it had resolved the Alphabetical mailbox issue!!! HUZZAH
    ...due to the amount of mail that was then re-caching we opted to resolve the iCloud mail account next.
    This time on clicking remove it launched the Internet Accounts pane Mail/ACCOUNTS not the Mail/Preferences/Accounts pane that we where in.
    clicked on iCLOUD and unticked Mail. Back into Mail/Preferences/Accounts and deleted iCloud account...this took us BACK to the Internet Accounts pane where we opted to remove the entire iCloud Account.
    ** at this point you will be presented with lots of DELETE/ MERGE pop ups as you are removing contacts/calendars etc... so be warned!!!!
    but on re-adding the iCloud Internet Account, it had resolved the Alphabetical mailbox issue again! HUZZAH
    Now the reason I've posted all the waffle to this simple REMOVE and RE-ADD solution
    is that it didn't do what I was expecting when clicking the remove mail account symbol, and I thought it best to point this out to others having the issue.
    and apart from it messing up my Address Book ON MY MAC Vs iCloud contacts (which was resolved thanks to that backup I took before I did  all this)
    all is now well in the Alphabetical mailbox dept (for me)
    Hope it works for you too!

  • My bubble sort doesn't work, and does anyone know

    how to count and print the scores of a certain grade.... all the 90's with a's, all the 80's with b's etc.... This is my first java program with two classes. I've been messing with it for about 24hours over the last week. :O. Any suggestions?
    import java.util.Scanner;
    public class GradeSort {
         public static void main(String [] args){
              //Scanner keyboard = new Scanner(System.in);
              System.out.println("How many students took the test?");
              Scanner kbd = new Scanner(System.in);
              int NUM_STUDENTS = kbd.nextInt();
              double [] grades = new double[NUM_STUDENTS];//Assn array
              readReadingsInto(grades);
              System.out.printf( "\nThe average is %.3f%n", average(grades));
              print(grades);}
              private static void readReadingsInto(double [] array){
                   Scanner keyboard = new Scanner(System.in);
                   for (int i =0; i < array.length; i++) {
                   System.out.print("enter grade # " + (i+1)+ "/" );
              array[i] = keyboard.nextInt();
         public static double average(double [] anArray){
              double sum = 0.0;
              for (double item : anArray){
                   sum += item;
              return sum/anArray.length;
    public static void bubbleSort ( double [] anArray )
    for (double i = anArray.length-1; i > 0; i-- )
    for ( int j = 0; j < i; j++ )
    if ( anArray[j] > anArray[j+1] )
    double temp = anArray[j];
    anArray[j] = anArray[j+1];
    anArray[j+1] = temp;}
    public static void print(double [] arr) {
         for (int i = 0; i < arr.length; i++){
              Grade gRade = new Grade(arr);
              System.out.println("Reading #" + (i+1)+" " + arr[i] + " " + gRade.letter() );
              //Grade gRade = new Grade(reading);
              //System.out.println( gRade.letter() );
              //System.out.print ( grades[1] );
    public class Grade {
         public static final double MIN = 0.0;
         public static final double MAX = 100.0;
         public Grade(double gRade){
              if (gRade < MIN || gRade > MAX){
                   System.err.println("Grade(): bad argument recievived: " + gRade);
              } else {
                   myValue = gRade;
    public String letter(){
         if (myValue < MIN || myValue > MAX){ return "error";}
    else if (myValue >= 90){return "A";}
    else if (myValue >= 80){return "B";}
    else if (myValue >= 70){return "C";}
    else return "Fail";     }
    private double myValue;

    Let me see if I can fix the formatting for you. The bubble sort, isn't sorting? The print after the sort is in the same order as I input the data.
    import java.util.Scanner;
    public class GradeSort {
         public static void main(String [] args){
              //Scanner keyboard = new Scanner(System.in);
              System.out.println("How many students took the test?");
              Scanner kbd = new Scanner(System.in);
              int NUM_STUDENTS = kbd.nextInt();
              double [] grades = new double[NUM_STUDENTS];//Assn array
              readReadingsInto(grades);
              System.out.printf( "\nThe average is %.3f%n", average(grades));
              print(grades);}
              private static void readReadingsInto(double [] array){
                   Scanner keyboard = new Scanner(System.in);
                   for (int i =0; i < array.length; i++) {
                   System.out.print("enter grade # " + (i+1)+ "/" );
              array[i] = keyboard.nextInt();
         public static double average(double [] anArray){
              double sum = 0.0;
              for (double item : anArray){
                   sum += item;
              return sum/anArray.length;
    public static void bubbleSort ( double [] anArray )
            for (double i = anArray.length-1; i > 0; i-- )
              for ( int j = 0; j < i; j++ )
                  if ( anArray[j] > anArray[j+1] )
                        double temp = anArray[j];
                        anArray[j] = anArray[j+1];
                        anArray[j+1] = temp;}
    public static void print(double [] arr) {
         for (int i = 0; i < arr.length; i++){
              Grade gRade = new Grade(arr);
              System.out.println("Reading #" + (i+1)+" " + arr[i] + " " + gRade.letter() );
              //Grade gRade = new Grade(reading);
              //System.out.println( gRade.letter() );
              //System.out.print ( grades[1] );
    The other class is:
    public class Grade {
         public static final double MIN = 0.0;
         public static final double MAX = 100.0;
         public Grade(double gRade){
              if (gRade < MIN || gRade > MAX){
                   System.err.println("Grade(): bad argument recievived: " + gRade);
              } else {
                   myValue = gRade;
    public String letter(){
         if (myValue < MIN || myValue > MAX){ return "error";}
    else if (myValue >= 90){return "A";}
    else if (myValue >= 80){return "B";}
    else if (myValue >= 70){return "C";}
    else return "Fail";     }
    private double myValue;

  • Bug in report sorting? Sort doesn't work in last group level.

    Is this a known error? Is there documentation from Oracle about it?
    My query is a simple select from a table. I then created three group levels. Each group contains a value for sorting (up arrow next to column). However, data is not sorted by the value in the third group.
    Try:
    create table test_sort (a number, b varchar2(5), c varchar2(5));
    insert into test_sort (a, b, c) values (1, 'A', 'X');
    insert into test_sort (a, b, c) values (1, 'B', 'Y');
    insert into test_sort (a, b, c) values (1, 'B', 'Z');
    insert into test_sort (a, b, c) values (1, 'A', 'Z');
    insert into test_sort (a, b, c) values (2, 'A', 'Z');
    insert into test_sort (a, b, c) values (2, 'A', 'Y');
    insert into test_sort (a, b, c) values (2, 'A', 'X');
    insert into test_sort (a, b, c) values (1, 'A', 'Y');
    insert into test_sort (a, b, c) values (1, 'B', 'X');
    Create a query tabular report with the wizard (select * from test_sort). Then make the groups: first a, then b, then c. Make sure that there is an arrow next to the values (sorting).
    The report only displays a and b values sorted.
    Edited by: user489847 on Jun 3, 2010 1:19 AM

    Hello,
    This is the normal behaviour documented here :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwcontxt/props/pi_col_break_order.htm
    Restrictions
    Break Order has no effect on columns that belong to the lowest group of a particular query.
    Break Order only affects columns in groups that are above the lowest child group of a query.
    You have to add an "ORDER BY" in the SQL query in order to sort the columns belonging to the "lowest group"
    Regards

  • Install/Uninstall of Sun Studio 12... kinda sorta doesn't work.

    Hi !
    I'm installing DBI.pm [inside a zone] using cpan from blastwave. It needs cc and make so I installed SS 12.
    Then I found out that the CLI installer doesn't installed into the zones, and that you have to use the graphical one.
    So , I got in thru my KVM-over-ip and ran the graphical installer.
    Now the weird part is, the section of the installer where it asks you which components you'd like to install, nothing is checked off, and the interface wouldn't let me check anything off...
    So then I thought , maybe I need to uninstall it and start fresh, so I upgraded to JDK 1.6 just in case and then followed the instructions in this document
    http://developers.sun.com/sunstudio/documentation/ss12/release_notes.html
    However, every time I run java on the uninstaller, I get the exception that is mentioned, and that's why I upgraded to jdk 1.6 ahead of time..
    sandbox# java -cp . uninstall_Sun_Studio_12ea -nodisplay
    Exception in thread "main" java.lang.NoClassDefFoundError: uninstall_Sun_Studio_12ea
    sandbox#
    Every time. So I'm stumped. And all I want is DBI.pm ;) Help would be great, thanks folks.
    jeff.

    Hi Bignose,
    We tried installing and then uninstalling and all attempts failed. Do you know someone that might be interested in trying to install it on our system.

  • What's going on with ios8... Screen rotate does not work anymore, wifi doesn't work very well anymore and apps are crashing or running slow... Come on Apple sort this mess out

    ssince I updated my iPhone 5s to ios8 ive had nothing but problems...
    first the the screen rotation is not working... Checked the settings and  lock is off.... The wifi is intermittent, some times it works sometimes it doesn't....
    the he iPhone is really slow now, like really labouring.... It hangs and crashes all the time.... I have to close apps down completely because they won't work from quick launch anymore.... Even writing this the phone is labouring.... It's like my old 48k spectrum.... I don't expect this from Apple and when you spend £400-500 on a phone you expect it to work and play propperly....  come on Apple you need to sort out this mess of a update.... Ios 7 was no bother......

    Same issue here... iphone5S 64GB.  It's intermittent.  Sometimes the rotation works fine, sometimes it doesn't, but most of the time it doesn't work.
    The first time I figured out it wasn't working was when all newly-taken photos and videos were showing up in portrait mode though I always hold in landscape mode when photographing.
    Rotation lock is disabled (tried toggling it on and off).  Tried recalibrating the compass on a whim, no effect (although my compass seems to always require calibration when it's launched now).
    This issue only started happening after upgrading to iOS8.  I did a reset/restore through iTunes rather than an OTA upgrade.
    UPDATE - power-cycling the phone seems to fix it temporarily.

  • Sort Albums Doesn't Work

    I have a bunch of albums in iPhoto that I am trying to sort, and it just doesn't work.
    When I select them, right-click, and choose "Sort Albums" from the context menu, either *nothing* happens, or else the order of the albums is altered in some seemingly random way but the results are not alphabetical order.
    I don't see how the program could somehow not understand "alphabetical" so there must be something keeping it from actually doing the sort.  Anybody have any clues?

    When there is a selection, if "Sort Albums" will do nothing then the option should be greyed out.  Otherwise, it should sort those items which are selected.  Doing nothing and giving the user no feedback is not acceptible.
    You are right, that is confusing.  It is either a bug or a poor design.
    You may want to send feedback to Apple - use the form: Apple - Aperture - Feedback

  • Sort function doesn't work E12

    the sort function doesn't work half the time on Elements 12 organizer.

    What about FUNCTION CLOCK_INFormula
    RETURN NUMBER
    IS
        l_hours_worked  NUMBER;
        l_to_return     NUMBER;
    BEGIN
        l_hours_worked := TO_NUMBER(NVL(:ATX_CLOCK_IN,'0'));
        IF (MOD((l_hours_worked - 0.02),0.25) = 0) THEN
            l_to_return := TRUNC((l_hours_worked - 0.02) * 4) / 4;
        ELSE
            l_to_return := TRUNC((l_hours_worked + 0.23) * 4) / 4;
        END IF;
        RETURN (l_to_return);
    EXCEPTION  
        WHEN VALUE_ERROR THEN
            RAISE_APPLICATION_ERROR ( -20100
            ,   'ERROR, Cannot represent '
            ||  :ATX_CLOCK_IN
            ||  ' as a number.');
    END CLOCK_INFormula;?
    This function assumes :ATX_CLOCK_IN is always positive.
    T.

  • SPGridView - sorting Dates doesn't work properly & how to display the title column as link?

    Hi,
    I've got a SPGridView that is being filled with data from several lists. Some of them are a date-field and a title-field. I already added sorting, paging and filtering options and at first look they seem to work fine. But now I noticed that sorting dates
    doesn't work as expected. If I select ascending sorting, the result is something like this:
    01.08.2014
    02.08.2014
    17.07.2014
    18.07.2014
    23.07.2014
    If I select descending sorting, the result is this:
    23.07.2014
    18.07.2014
    17.07.2014
    02.08.2014
    01.08.2014
    This isn't what I want obviously. 
    I just added the EventReceiver for the sorting like it is shown in several tutorials:
    (The date field is a BoundField.)
    grid.Sorting += new GridViewSortEventHandler(grid_Sorting);
    private void grid_Sorting(object sender, GridViewSortEventArgs e)
    if (ViewState["FilterExpression"] != null)
    gridDS.FilterExpression = (string)ViewState["FilterExpression"];
    And my second problem is how to add a link to the title column. In my grid I'm displaying tasks from different lists and I want to link the title to the related task. I stumbled accross HyperLinkFields and tried this:
    HyperLinkField hyperLinkField = new HyperLinkField();
    hyperLinkField.DataTextField = "Titel";
    hyperLinkField.DataNavigateUrlFields = new string[] { "Titel" };
    hyperLinkField.DataNavigateUrlFormatString = "{0}";
    hyperLinkField.HeaderText = "Titel";
    hyperLinkField.SortExpression = "Titel";
    grid.Columns.Add(hyperLinkField);
    The resulting link is something like ...sites/MySite/_catalogs/masterpage/A1-V1-2 where "A1-V1-2" is the name of the task and also shown in the title field.
    The actual link should look more like ...sites/MySite/Lists/mytasklistname/DispForm.aspx?ID=.... or something like that to display the task details. How could I achieve that?
    Thanks in advance

    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27718782.html
    Here is the exact code you need to use:
    http://social.msdn.microsoft.com/Forums/ar/sharepointcustomization/thread/c463a8c6-4806-4233-b6a4-8db8369c5fc2
    http://sharepoint.stackexchange.com/questions/53459/change-title-linked-to-item-with-edit-menu-to-different-column
    Open the AllItems.aspx page for the specific list.
    Search for the <ViewFields> tag
    List item LinkToItem="TRUE" to whichever column you want the link:
    <ViewFields><br/>
    <FieldRef Name="Attachments"/><br/>
    <FieldRef Name="LinkTitle"/><br/>
    <FieldRef Name="linkThisColumn" LinkToItem="TRUE"/><br/>
    <FieldRef Name="data_x0020_column"/><br/>
    <FieldRef Name="Another_x0020_column"/><br/>
    </ViewFields><br/>
    http://sharepoint.stackexchange.com/questions/58954/link-title-in-list-to-value-in-url-column
    Create calculated column.
    Insert following formula -
    ="<a href='"&UrlFieldName&"'>"&Title&"</a>"
    Set "data type returned from this formula is" to integer.
    As a result on list view you will see the title with link to your url.
    UPD: It seems that URL field is not valid for calculated column, as workaround you can copy url value in a receiver into the another text field, which is not shown on the view.
    If this helped you resolve your issue, please mark it Answered

Maybe you are looking for

  • Question about the default style of af:inputText in ADF

    Hi all, Here's the situation I am facing: in the jspx page, I have a <af:inputText inlineStyle="bk_bean.defaultStyle"... onchange="validate(this)"/> in the javascript: function validate(control){ // when the input is invalid: control.style.background

  • CAPS Web Service client fails in Weblogic 9.2

    Hi. I'm trying to run a web service client, created in CAPS to run in Weblogic 9.2 The web service client runs fine in Sun AS but fails in Weblogic with the message: javax.ejb.CreateException: Exception occurred during creation of message ... Are the

  • Disable theMail user to re-enable the auto complete function in Composing.

    Hi Just wondering if anyone knows of a way of disabling the auto-complete function of the Addressing section under Composing in Mails preferences? To many company emails are being sent to the wrong recipients. I have changed everyones preferences and

  • Web Module still referenced in App Server even though deleted

    I am trying to test a servlet. I created the servlet in the same module as my jsp. A previous web module that contained this servlet was unmounted, deleted and undeployed from the IDE/Appserver. But when I run the jsp, the address bar still shows the

  • Mac Mini won't start up properly

    I have the latest generation Mac Mini (actually it's my son's) and it worked fine for some months (2 months to be precise). He doesn't use it very often, maybe once a week or so. And then suddenly the Mac Mini doesn't want to start up properly. It st