Sorting in an ArrayField

Hi y'all:
I may be missing something obvious, but I can't find a way to sort the
items in an ArrayField widget. I see that sorting in a ListView widget
is rather simple -- the widget does it for you (under 95 or NT), and the
user will simply click on the column heading to choose the sort key.
Will I need to load my array into a ListView field, or is there another
way to specify my sort column for a basic ArrayField?
Thanks,
Brian

Most of what you need is already written in the Java Collections Framework.
http://java.sun.com/j2se/1.5.0/docs/guide/collections/index.html
You need to write a compare function that implements
the natural ordering you want.
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Comparable.html
Then the Collections methods can do their work and provide
you with a sorted list.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#sort(java.util.List)

Similar Messages

  • Re: Sorting in ArrayField widget.

    Hi,
    If you need a little sample about sorting Arrays or Listviews you can find
    one on http://perso.club-internet.fr/dnguyen/
    It shows how to use a QuickSort generic class (the source code of that class
    is not delivered, but you can find a quicksort sample class at forte.com) :
    - Sub-class the class
    - Overwrite DoSortExpLow and DoSortExpSup
    - In your user class, call QuickSort(Self.SortArray, 1,
    Self.SortArray.Items, pcol, Self.SortListMode) where SortArray is the Array
    to sort, pCol is a parameter that defines the column and SortListMode
    defines if you want an ascending or descending sort.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Url : http://perso.club-internet.fr/dnguyen/
    David Foote a écrit:
    There is a more flexible solution with less code duplication that has
    worked well for us.
    Create a class SortService with a method with the following signature:
    Sort(list:Array of Object, stategy:ComparisonStrategy):Array of Object
    create a class called ComparisonStrategy with a method with the
    following signature:
    Compare(a:Object,b:Object):integer
    For each class that needs to be sorted, define a new
    ComparisonStrategy sub-class that overrides the Compare()
    method. Inside the overridden Compare() method, cast a and b to the
    correct class and compare them by whatever criteria is appropriate.
    If a>b return 1, if a=b return zero, if a<b return -1. Inside the
    SortService.Sort() method, call strategy.Compare(a=object1,b=object2)
    each time you need to compare two objects.
    This is quite similar to the C-library's implementation of the qsort
    function:
    void qsort( void *base, size_t num, size_t width, int (__cdecl
    compare )(const void elem1, const void *elem2 ) );
    compare( (void *) elem1, (void *) elem2 );
    It is also a good use of the Strategy design pattern. The one method,
    Sort(), will now sort any list of objects for which you pass in an
    appropriate ComparisonStrategy sub-class. The objects to be sorted do
    not have to implement any extra interface or inherit from any
    particular class. If you are interested and need more help I can
    probably lay my hands on some source.
    P.S. This sort should be applied to the data array not the
    arrayfield.
    David N. Foote
    ----Original Message Follows----
    What you need is a set of sort methods, one for each basic data type
    and a wrapper method which discovers the data type of the column to be
    sorted and calls the appropriate Sort method.
    Create a group of sort methods depending on the data type
    e.g..
    sortInt( p_Arr : Array of Object, Col : integer ),
    SortString( p_Arr : Array of Object, Col : integer ) ,
    SortYour4GLObject( p_Arr : Array of Object, Col : integer ) etc.
    Then create a wrapper method called Sort( p_Arr : Array of Object,
    Col :
    integer ).
    In this method, look at p_Arr[Col].ClassName to find out the datatype
    and appropriately call the method which sorts that data type
    i.e..,
    SortInt() if ClassName is qqsp_integer,
    SortString() if ClassName is qqsp_string
    SortYour4GLObject() if ClassName is Your4GLClass etc.
    In each of the sort method, implement the sort algorithm on the
    p_Arr[ Col ] values.
    Good luck,
    Ajith Kallambella. M
    Fort&eacute; Systems Engineer,
    International Business Corporation.
    -----Original Message-----
    From: Savory, Mark [mailto:[email protected]]
    Sent: Thursday, March 11, 1999 9:54 AM
    To: 'Kapil Tyagi'; '[email protected]'
    Subject: RE: Sorting in ArrayField widget.
    Kapil,
    Since you can't inherit from Array, you can create a helper for
    sorting
    arrays in general. Some helper class would have a method called:
    SomeHelperClass.Sort(list: Array of SomeInterface, column : int):Array
    of
    SomeInterface. The SomeInterface interface would have a virtual
    method
    called:
    SomeInterface.GetColumn(col:int):DataValue. All your classes that
    would be
    in an array to sort would have to implement the SomeInterface
    interface.
    Implementing the GetColumn method would require that your class
    attributes
    inherit from DataValue(TextData, DoubleData, IntegerData, etc.) or the
    GetColumn method could do a conversion. The SomeHelperClass.Sort
    method
    could then sort the appropriate column of the array.
    Mark Savory
    GTE Gov. Sys.
    -----Original Message-----
    From: Kapil Tyagi [mailto:[email protected]]
    Sent: Thursday, March 11, 1999 4:02 AM
    To: '[email protected]'
    Subject: Sorting in ArrayField widget.
    Hi,
    We are using ArrayField widget. Forte does not provide any in-built
    sorting
    facility
    in ArrayField as it does in ListView.
    Is there an easy way to do that?
    If we implement our own sorting algorithm then how do we make it
    generic
    method
    for different arrays.
    We can use GetChildInCell to fetch the values generically, but it
    works only
    for
    visible rows.
    Any pointers in this direction are appreciated.
    Kapil Tyagi
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    Get Free Email and Do More On The Web. Visit http://www.msn.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi,
    If you need a little sample about sorting Arrays or Listviews you can find
    one on http://perso.club-internet.fr/dnguyen/
    It shows how to use a QuickSort generic class (the source code of that class
    is not delivered, but you can find a quicksort sample class at forte.com) :
    - Sub-class the class
    - Overwrite DoSortExpLow and DoSortExpSup
    - In your user class, call QuickSort(Self.SortArray, 1,
    Self.SortArray.Items, pcol, Self.SortListMode) where SortArray is the Array
    to sort, pCol is a parameter that defines the column and SortListMode
    defines if you want an ascending or descending sort.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Url : http://perso.club-internet.fr/dnguyen/
    David Foote a &eacute;crit:
    There is a more flexible solution with less code duplication that has
    worked well for us.
    Create a class SortService with a method with the following signature:
    Sort(list:Array of Object, stategy:ComparisonStrategy):Array of Object
    create a class called ComparisonStrategy with a method with the
    following signature:
    Compare(a:Object,b:Object):integer
    For each class that needs to be sorted, define a new
    ComparisonStrategy sub-class that overrides the Compare()
    method. Inside the overridden Compare() method, cast a and b to the
    correct class and compare them by whatever criteria is appropriate.
    If a>b return 1, if a=b return zero, if a<b return -1. Inside the
    SortService.Sort() method, call strategy.Compare(a=object1,b=object2)
    each time you need to compare two objects.
    This is quite similar to the C-library's implementation of the qsort
    function:
    void qsort( void *base, size_t num, size_t width, int (__cdecl
    compare )(const void elem1, const void *elem2 ) );
    compare( (void *) elem1, (void *) elem2 );
    It is also a good use of the Strategy design pattern. The one method,
    Sort(), will now sort any list of objects for which you pass in an
    appropriate ComparisonStrategy sub-class. The objects to be sorted do
    not have to implement any extra interface or inherit from any
    particular class. If you are interested and need more help I can
    probably lay my hands on some source.
    P.S. This sort should be applied to the data array not the
    arrayfield.
    David N. Foote
    ----Original Message Follows----
    What you need is a set of sort methods, one for each basic data type
    and a wrapper method which discovers the data type of the column to be
    sorted and calls the appropriate Sort method.
    Create a group of sort methods depending on the data type
    e.g..
    sortInt( p_Arr : Array of Object, Col : integer ),
    SortString( p_Arr : Array of Object, Col : integer ) ,
    SortYour4GLObject( p_Arr : Array of Object, Col : integer ) etc.
    Then create a wrapper method called Sort( p_Arr : Array of Object,
    Col :
    integer ).
    In this method, look at p_Arr[Col].ClassName to find out the datatype
    and appropriately call the method which sorts that data type
    i.e..,
    SortInt() if ClassName is qqsp_integer,
    SortString() if ClassName is qqsp_string
    SortYour4GLObject() if ClassName is Your4GLClass etc.
    In each of the sort method, implement the sort algorithm on the
    p_Arr[ Col ] values.
    Good luck,
    Ajith Kallambella. M
    Fort&eacute; Systems Engineer,
    International Business Corporation.
    -----Original Message-----
    From: Savory, Mark [mailto:[email protected]]
    Sent: Thursday, March 11, 1999 9:54 AM
    To: 'Kapil Tyagi'; '[email protected]'
    Subject: RE: Sorting in ArrayField widget.
    Kapil,
    Since you can't inherit from Array, you can create a helper for
    sorting
    arrays in general. Some helper class would have a method called:
    SomeHelperClass.Sort(list: Array of SomeInterface, column : int):Array
    of
    SomeInterface. The SomeInterface interface would have a virtual
    method
    called:
    SomeInterface.GetColumn(col:int):DataValue. All your classes that
    would be
    in an array to sort would have to implement the SomeInterface
    interface.
    Implementing the GetColumn method would require that your class
    attributes
    inherit from DataValue(TextData, DoubleData, IntegerData, etc.) or the
    GetColumn method could do a conversion. The SomeHelperClass.Sort
    method
    could then sort the appropriate column of the array.
    Mark Savory
    GTE Gov. Sys.
    -----Original Message-----
    From: Kapil Tyagi [mailto:[email protected]]
    Sent: Thursday, March 11, 1999 4:02 AM
    To: '[email protected]'
    Subject: Sorting in ArrayField widget.
    Hi,
    We are using ArrayField widget. Forte does not provide any in-built
    sorting
    facility
    in ArrayField as it does in ListView.
    Is there an easy way to do that?
    If we implement our own sorting algorithm then how do we make it
    generic
    method
    for different arrays.
    We can use GetChildInCell to fetch the values generically, but it
    works only
    for
    visible rows.
    Any pointers in this direction are appreciated.
    Kapil Tyagi
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    Get Free Email and Do More On The Web. Visit http://www.msn.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Sorting in ArrayField widget.

    Hi,
    We are using ArrayField widget. Forte does not provide any in-built sorting facility
    in ArrayField as it does in ListView.
    Is there an easy way to do that?
    If we implement our own sorting algorithm then how do we make it generic method
    for different arrays.
    We can use GetChildInCell to fetch the values generically, but it works only for
    visible rows.
    Any pointers in this direction are appreciated.
    Kapil Tyagi
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi,
    I would be interested in how the objects are sorted i.e. on which attribute the objects will get sorted.
    On runtime only it will be known that on which attribute the objects is to be sorted. The problem is compounded further because the data type of attributes is also different.
    Thanks for all your replies. I have designed/written a generic reusable code for sorting in an ArrayField widget. On double clicking the column title the array gets sorted on the corresponding column.
    Thanks and regards
    Kapil Tyagi
    From: David Foote[SMTP:[email protected]]
    Reply To: David Foote
    Sent: Tuesday, April 13, 1999 12:55 PM
    To: [email protected]
    Subject: RE: Sorting in ArrayField widget.
    There is a more flexible solution with less code duplication that has
    worked well for us.
    Create a class SortService with a method with the following signature:
    Sort(list:Array of Object, stategy:ComparisonStrategy):Array of Object
    create a class called ComparisonStrategy with a method with the
    following signature:
    Compare(a:Object,b:Object):integer
    For each class that needs to be sorted, define a new
    ComparisonStrategy sub-class that overrides the Compare()
    method. Inside the overridden Compare() method, cast a and b to the
    correct class and compare them by whatever criteria is appropriate.
    If a>b return 1, if a=b return zero, if a<b return -1. Inside the
    SortService.Sort() method, call strategy.Compare(a=object1,b=object2)
    each time you need to compare two objects.
    This is quite similar to the C-library's implementation of the qsort
    function:
    void qsort( void *base, size_t num, size_t width, int (__cdecl
    compare )(const void elem1, const void *elem2 ) );
    compare( (void *) elem1, (void *) elem2 );
    It is also a good use of the Strategy design pattern. The one method,
    Sort(), will now sort any list of objects for which you pass in an
    appropriate ComparisonStrategy sub-class. The objects to be sorted do
    not have to implement any extra interface or inherit from any
    particular class. If you are interested and need more help I can
    probably lay my hands on some source.
    P.S. This sort should be applied to the data array not the
    arrayfield.
    David N. Foote
    ----Original Message Follows----
    What you need is a set of sort methods, one for each basic data type
    and a wrapper method which discovers the data type of the column to be
    sorted and calls the appropriate Sort method.
    Create a group of sort methods depending on the data type
    e.g..
    sortInt( p_Arr : Array of Object, Col : integer ),
    SortString( p_Arr : Array of Object, Col : integer ) ,
    SortYour4GLObject( p_Arr : Array of Object, Col : integer ) etc.
    Then create a wrapper method called Sort( p_Arr : Array of Object,
    Col :
    integer ).
    In this method, look at p_Arr[Col].ClassName to find out the datatype
    and appropriately call the method which sorts that data type
    i.e..,
    SortInt() if ClassName is qqsp_integer,
    SortString() if ClassName is qqsp_string
    SortYour4GLObject() if ClassName is Your4GLClass etc.
    In each of the sort method, implement the sort algorithm on the
    p_Arr[ Col ] values.
    Good luck,
    Ajith Kallambella. M
    Fort&eacute; Systems Engineer,
    International Business Corporation.
    -----Original Message-----
    From: Savory, Mark [mailto:[email protected]]
    Sent: Thursday, March 11, 1999 9:54 AM
    To: 'Kapil Tyagi'; '[email protected]'
    Subject: RE: Sorting in ArrayField widget.
    Kapil,
    Since you can't inherit from Array, you can create a helper for
    sorting
    arrays in general. Some helper class would have a method called:
    SomeHelperClass.Sort(list: Array of SomeInterface, column : int):Array
    of
    SomeInterface. The SomeInterface interface would have a virtual
    method
    called:
    SomeInterface.GetColumn(col:int):DataValue. All your classes that
    would be
    in an array to sort would have to implement the SomeInterface
    interface.
    Implementing the GetColumn method would require that your class
    attributes
    inherit from DataValue(TextData, DoubleData, IntegerData, etc.) or the
    GetColumn method could do a conversion. The SomeHelperClass.Sort
    method
    could then sort the appropriate column of the array.
    Mark Savory
    GTE Gov. Sys.
    -----Original Message-----
    From: Kapil Tyagi [mailto:[email protected]]
    Sent: Thursday, March 11, 1999 4:02 AM
    To: '[email protected]'
    Subject: Sorting in ArrayField widget.
    Hi,
    We are using ArrayField widget. Forte does not provide any in-built
    sorting
    facility
    in ArrayField as it does in ListView.
    Is there an easy way to do that?
    If we implement our own sorting algorithm then how do we make it
    generic
    method
    for different arrays.
    We can use GetChildInCell to fetch the values generically, but it
    works only
    for
    visible rows.
    Any pointers in this direction are appreciated.
    Kapil Tyagi
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    Get Free Email and Do More On The Web. Visit http://www.msn.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Enhancing ArrayField column titles

    I am considering the feasibility of creating a class to assist in
    identifying a user request to sort a column in an ArrayField, and then
    providing feedback to the user that is was done. Ideally, I'd love something
    like Outlook has in its listView's column headers, where a the sorted column
    has a triangle next to it (and indicates the sort direction as well); a poor
    man's version of this would be acceptable as well, perhaps with a ^
    (ascending sort) or v (descending sort) character appended to the column's
    text.
    My current problem in trying this out is accurately identifying which column
    title was clicked. I'm using the ArrayField's own column GridField, which
    contains TextGraphics for titles. You can name the TextGraphics, but
    apparently the compiler wont recognize them (won't recognize the column
    GridField either for that matter). I can set up an event for
    <MyArrayField>.ChildClick, but of course that just gives me the child column
    GridField, when I really need the column GridField's child TextGraphic (ie,
    MyColTitle).
    Has anybody tried to do something like this? Any and all ideas much
    appreciated!
    Eric
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>

    Eric,
    I've got a sample class that creates "active headings" for array fields. Each
    column title is capable of being clicked and you can then code whatever action
    you want for that click. Unfortunately I am in the middle of a cross country move
    and won't have access to my samples until sometime in August. The original sample
    was presented at the 1998 Forum. If you have access to those materials you can
    find it there.
    Hope this helps. If you still want my example in August let me know and I'll
    forward it then.
    regards,
    /\/\ark
    "Fingerhut, Eric" wrote:
    I am considering the feasibility of creating a class to assist in
    identifying a user request to sort a column in an ArrayField, and then
    providing feedback to the user that is was done. Ideally, I'd love something
    like Outlook has in its listView's column headers, where a the sorted column
    has a triangle next to it (and indicates the sort direction as well); a poor
    man's version of this would be acceptable as well, perhaps with a ^
    (ascending sort) or v (descending sort) character appended to the column's
    text.
    My current problem in trying this out is accurately identifying which column
    title was clicked. I'm using the ArrayField's own column GridField, which
    contains TextGraphics for titles. You can name the TextGraphics, but
    apparently the compiler wont recognize them (won't recognize the column
    GridField either for that matter). I can set up an event for
    <MyArrayField>.ChildClick, but of course that just gives me the child column
    GridField, when I really need the column GridField's child TextGraphic (ie,
    MyColTitle).
    Has anybody tried to do something like this? Any and all ideas much
    appreciated!
    Eric
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>--
    mark h. nichols
    "focus on the question, not on the answer"
    Software Engineer - Forte
    HOME Account Network, Inc.
    mail: Four Beaufain Street - Suite 300 - Charleston, SC 29401
    phone: 843.805.5221
    fax: 843.722.7082
    email: [email protected]
    web: www.homeaccount.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>

  • In Photoshop Express, cannot sort images in album by filename in thumbnail view (for slideshow)l.

    In Photoshop Express, I want images to appear sorted by filename.  In the "view as a table" it sorts fine.  When I revert to the thumbnail view, the arrangement is random.  The dropdown "show" list does not offer an option for showing by filename.  If I select the"custom" option, it means I would need to sort 300 images by filename MANUALLY (!!!), a job that a computer does in milliseconds.  Anyone with a solution?  Thanks.

    fwiw, with my images in the 'Folder Location' view the photos are in order by their Windows filename. That is the same order as the hardcopy album the photos came from. So I then created a PSE Album. I selected all my photos and moved them into that album. The order of the pictures was retained in the Album. That worked out great. I wanted my PSE images to be in the same order. I thought I would do it with tags. But creating an album seems to work just fine.

  • Unable to capture the adf table column sort icons using open script tool

    Hi All,
    I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
    1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
    2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

  • How to sort out different issues on Satellite A505-S6973

    Can anyone tell me, if the warranty period on my laptop has not passed, can i return my laptop to toshiba and have all my issues sorted out. Would there be a cost to do whatever repairs software related needs be done and how i am supposed to go about it because my laptop is beginning to have all sorts of little errors, i noticed that my harddrive has 156gb used although i have about 60 gigs in use.
    A couple multimedia buttons aren't working but i touch them, my touchpad doesn't turn off with the hard button unless i turn it off using the FN key and my processor runs low but when i use a program i see it's reaching between 85 to 100% utilization.
    I really like this laptop, but the issues i'm having i highly doubt it should operate this way.

    Hi mate
    Software issues are not covered by warranty!
    This means that you will have to pay for everything if the ASP technician would not find any problems!
    This is why you should recover the notebook in order to check if its only a software related issue.
    >A couple multimedia buttons aren't working but i touch them, my touchpad doesn't turn off with the hard button unless i turn it off using the FN key
    Reinstall the VAP (value added package) and flash cards utility
    >my processor runs low but when i use a program i see it's reaching between 85 to 100% utilization.
    This is not a bug or hardware problem. You will notice this CPU behavior because the CPU supports an feature which helps to save the power and reduce the heat dissipation

  • Issue With Page Break When Sorting is also applied on group

    Hi
    I am facing an issue with Page break only when I have sorting applied on the grouping that I have in the template.
    The following is the sample XML
    <ROWSET>
    <ROW>
    <GRE>org1</GRE>
    <ORGANIZATION>Accounts</ORGANIZATION>
    <FULL_NAME>test1,</FULL_NAME>
    <ELEMENT_NAME>TEST BONUS</ELEMENT_NAME>
    <CLASSIFICATION>Supplemental Earnings</CLASSIFICATION>
    <RUN_VALUE>250</RUN_VALUE>
    <MONTH_VALUE>500</MONTH_VALUE>
    <QUARTER_VALUE>500</QUARTER_VALUE>
    <YEAR_VALUE>500</YEAR_VALUE>
    </ROW>
    <ROW>
    <GRE>org1</GRE>
    <ORGANIZATION>Finance</ORGANIZATION>
    <FULL_NAME>test2</FULL_NAME>
    <ELEMENT_NAME>VOLUNTARY AD AND D</ELEMENT_NAME>
    <CLASSIFICATION>Voluntary Deductions</CLASSIFICATION>
    <RUN_VALUE>5.19</RUN_VALUE>
    <MONTH_VALUE>10.38</MONTH_VALUE>
    <QUARTER_VALUE>10.38</QUARTER_VALUE>
    <YEAR_VALUE>10.38</YEAR_VALUE>
    </ROW>
    <ROW>
    <GRE>org1</GRE>
    <ORGANIZATION>Finance</ORGANIZATION>
    <FULL_NAME>test3</FULL_NAME>
    <ELEMENT_NAME>HMO MEDICAL</ELEMENT_NAME>
    <CLASSIFICATION>Pre-Tax Deductions</CLASSIFICATION>
    <RUN_VALUE>19.67</RUN_VALUE>
    <MONTH_VALUE>39.34</MONTH_VALUE>
    <QUARTER_VALUE>39.34</QUARTER_VALUE>
    <YEAR_VALUE>39.34</YEAR_VALUE>
    </ROW>
    <ROW>
    <GRE>org1</GRE>
    <ORGANIZATION>Finance</ORGANIZATION>
    <FULL_NAME>test4</FULL_NAME>
    <ELEMENT_NAME>PENSION NR DC</ELEMENT_NAME>
    <CLASSIFICATION>Pre-Tax Deductions</CLASSIFICATION>
    <RUN_VALUE>0</RUN_VALUE>
    <MONTH_VALUE>360</MONTH_VALUE>
    <QUARTER_VALUE>360</QUARTER_VALUE>
    <YEAR_VALUE>360</YEAR_VALUE>
    </ROW>
    </ROWSET>
    In the template I group the data based on CLASSIFICATION and then sort on the same column CLASSIFICATION. I have a page-break applied for every group.
    When I generate the PDF, I am not getting the page-breaks for every group. Instead some of them are displayed in the same page.
    But when I remove the sorting that I had in the template on the column CLASSIFICATION, I am getting the output in the desired way but not in a sorted order.
    kumar

    Hi All,
    I am using MS-WORD 2007 and BI Publisher desktop 10.1.3.3.3.
    When I use split-by-page-break, splitting is performed for every line .. but not for group of lines.
    Can anybody throw some light on this?
    FYI...
    I am using this code:
    ?if: position() mod 6= 0?
    ?split-by-page-break:?
    ?end if?
    (Of course with in tags)
    in G_LINES loop.
    Can anybody help me out :-(
    --Saritha                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ALV .  How to remove the sort buttons on toolbar in ALV report?

    Hi,experts
      As you know, in default case , the alv report will display two sort buttons(ascending ,descending) on its toolbar , So How to remove the sort buttons on toolbar in ALV report?
      Thanks for your help .

    Hi guixin,
    1. Before calling REUSE_ALV_LIST_DISPLAY
    2. Write this code :
    data : excl type SLIS_T_EXTAB.
    data : exclwa type SLIS_EXTAB.
    exclwa = '&OUP'.
    append exclwa to excl.
    exclwa = '&ODN'.
    append exclwa to excl.
    3. Then while calling the FM,
       pass this parameter also .
    IT_EXCLUDING     = excl
    It will work fantastic.
    regards,
    amit m.

  • Field should not display in the subtotal row in ALV report after sorting .

    we have a requirement, after sorting and subtotaling, the output in ALV is -
    vbeln        amount1  amount2  amount3
    123           11              12            13
    123           12             13             14
    123           23             25             27 
    133           11              12            13
    133           12             13             14
    133           23             25             27
    Now the customer wants the ALV outpput in this fashion -
    123           11              12            13
    123           12             13             14
                     23             25             27    --->123 (vbeln) should not come in subtotaling row
    133           11              12            13
    133           12             13             14
                      23             25             27--->133(vbeln) should not come in subtotaling row

    Hi,
    if it helps you could create a hierachy. In this way you can define the field catalog for the lines and for the subtotal columns. The only thing is that you would always show the subtotal rows.
    You have references of hierachy alvs in
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f
    ALV Hierarchy
    alv hierarchy
    In this case it also sorts
    Sorting for ALV hierarchy
    I hope it helps.
    Edited by: Oscar Pecharroman on Aug 2, 2010 1:13 PM

  • Sorting not working correctly for date field in alv report

    Hi All,
    My report displays many rows also containing date type fields of bldat,budat .
    When I sort the report selecting field of type bldat budat the sorting is not correct for the year.
    Ex:
    Invoice doc dat
    01-25-2011
    01-21-2011
    02-02-2011
    10-25-2010
    11-20-2010
    If I use ascending then it is sorted as :
    Invoice doc dat
    01-21-2011
    01-25-2011
    02-02-2011
    10-20-2010
    10-25-2010
    Why the sorting is not working correct for year.(2010 records should have been first).
    The field wa_tab-bldat is of type char10.
    It is populated as wa_tab-bldat = bsak-bldat.
    Kindly suggest what can be done.

    The field wa_tab-bldat is of type char10
    Then what it does is correct.
    Refer to type datum...it will work

  • Sort field in ALV report

    Hi Expert,
    IN  ALV report using RESUE_ALV_GRID_DISPLAY . I want to sort the second field of ALV output . In this function module  RESUE_ALV_GRID_DISPLAY  using event PF_STATUS . so can u tell me how sort the second field .
    Regards
    Bhabani

    Hi,
    check the fallowing code
    IT_SORT TYPE SLIS_T_SORTINFO_ALV,
    WA_SORT TYPE slis_sortinfo_alv,
    ****SORT LABELS AT RUN TIME
      WA_SORT-TABNAME = 'IT_FINAL1'.
      WA_SORT-FIELDNAME = 'BUDAT'.
      WA_SORT-UP = 'X'.
      WA_SORT-GROUP = 'X'.
    WA_SORT-subtot = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-TABNAME = 'IT_FINAL1'.
      WA_SORT-FIELDNAME = 'MATNR'.
      WA_SORT-UP = 'X'.
      WA_SORT-GROUP = 'X'.
    WA_SORT-subtot = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM               = SY-REPID
          I_CALLBACK_TOP_OF_PAGE           = 'TOP_OF_PAGE'
          IS_LAYOUT                        =  LAYOUT
          IT_FIELDCAT                      = IT_FIELDCAT
          IT_SORT                          = IT_SORT
          I_DEFAULT                        = 'X'
          I_SAVE                           = 'U'
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
         TABLES
           T_OUTTAB                        = IT_FINAL1
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Nandan.N

  • Sorting in 6i and 10g reports

    Hello All,
    I am running 6i and 10g reports against a 10g database.
    I ran one of the 6i report and it generated a report in one sorting ordear
    and when i ran the same report on 10g ,it generated the report in ddifferent order.
    Both the reports r run against the same 10g database.
    The order by clause on the columns of the records r identical.
    Now i wanted to understand how it is sorting in different orders in both 6i and 10g reports?
    Thanks,
    Ranz

    Hi,
    Please note the fact that 6i Reports is not certified to work with 10g Database. Hence it becomes impossible to address the sorting behavior of 6i Reports, though there is nothing different in the way it works. I would suggest you to use 10gR2 version of Reports services with 10g Database which is certified and supported. Thanks for your understanding.
    Regards,
    Anand

  • Is there a way of making my iPod's "cover flow" sort in the same way the software can . Artist -- Album by Year . It only seems to do Artist -- by Alphabetical Album . I want it look like it does on the PC .

    Is there a way to make the "cover flow" on the iPod match the sort style that I use on the software . I go with Artist -- Album by Release Year . But the ipod seems to only do Artist -- Alphabetical by Album , and then there are a handful of albums oddly out of place . Can it be done ?

    Ottonomy, here's what to do.
    Connect your iPhone to your computer and open the iPhone's playlist in an iTunes window. Copy/Paste the entire playlist into a new(!) playlist in iTunes, not on your iPhone. Then resort the playlist. After you sort it, Copy/Paste it to a new(!) playlist on your iPhone. Now delete the old playlist on your iPhone and rename the new playlist the name you want it to be (probably the same name as the old playlist).
    The downside to this method is that you have to do it every time you add a song to the playlist. Unfortunately, I don't think there's another way.

  • ICal Print List - Why are to-dos randomly sorted?

    When printing from iCal in the list view, my To-Do List is NEVER sorted the way I sorted it in the main iCal window (whether by Calendar, Priority, or Manually). Instead it's just sorted randomly, which is very unorganized.
    Does anyone know why this is, or what can be done to fix it?

    It sounds like from your description that you're entering a date as a string in the todo description. Ideally you should be entering the date as the due date. This will help the sort order both in iCal and when printing. When you decide to print the To Do List, make sure View is set to List. Only check To Dos. In the time range, select the range you want to see. Anything without a due date will be printed under the heading To Dos without Due Date.

Maybe you are looking for