Displaying the sorted acct number as the first element

Hi,
I have list of account numbers , say 5 account numbers (2300,5200,7689,1234,4566) from which I found which is the parent acct number by invoking a query. Here the parent acct number is say "1234". Now i need to make sure that parent acct number records should always display at the top part of the screen followed by other child acct numbers displayed in ascending order. Here my question is, having found the parent acct no (1234) , how I can make sure this will be displayed at the top. Because the final list contains other acct numbers as well. Using comparator is a pbm. as i cannot pass the parent acct no to the compare() method to display this at the top. I want to do this in a single final list itself which contains all the acct number details. How to go about this? Please shed some light into this.
Thanks.
JavaCrazy

Re: Sorting the respective account number at the top
What happened to this thread?

Similar Messages

  • Pages will only display the first page of text.

    Pages will only display the first page of text. New pages are created as usual but blank and pages are visible through quick views. Reinstalling does not fix the problem, I don't know if it is an issue with settings. Pages v 4.1 on OS 10.7.4. Running on new macbook with retina.
    This is apparently a retina issue. Update hopefully soon

    You have not said but it sounds like you are using a Macbook pro with retina display.
    Pages is exhibiting all sorts of problems with the Retina display which Apple is supposedly working on.
    Peter

  • How can I display the first and last name using a paramater as employee ID?

    Hi SAP,
    I have a parameter that is called {? Employee ID}.   What I want to do is display the first and last name based on the employee ID value entered in {? Employee ID} in the page header of the report.  Right now, when I put the following formula in the page header only some pages get the right result while other pages dont....
    if table.employeeid = {? Employee ID} then
    table.firstname" "table.lastname
    It appears as though if the first record in the details section on the beginning of each page happens to be the employee under {? Employee ID} then it prints it correctly, if it isn't I get a null value in the page header.
    Anyone have any ideas?
    Z

    Hi Try this,
    Whileprintingrecords;
    if ={?EmpID} then
    Also check the option "Default values for null" in the formula editor.
    Regards,
    Vinay

  • UITextView doesn't display the first part of the text

    I am having a trouble with UITextView.
    When a text view is loaded for the first time after my app is launched (the text view is created and text is filled from saved data), the text view displays from the first letter of the text.
    But once the text view becomes first responder, then disappers by pressing back button on a navigation bar, and come back to the text view again by using a control on the previous view (a button for instance), the text view always displays the last part of the text.
    This happens after the text view becomes first responder. What is changed before and after the text view becomes first responder? And how can I avoid this to display the first letter in the text view always when it appears?
    I tried resignFirstResponder, selectedRange, and scrollRangeToVisible: in viewWill/DidAppear/Disappear but all of them didn't work.

    Thank you iPhil_good, but it didn't work ...
    And RickMaddy, I don't know how to post image but as it is UITextView, I use text to explain.
    There are two views, home view and text view, and UITextView is in the text view. The first time the UITextView appears (slides in from the home view), it looks like:
    Test[1] Test[2] Test[3] Test[4]
    Test[5] Test[6] Test[7] Test[8]
    Test[9] Test[10] Test[11] Test[12]
    Suppose the text starts at Test[1] and ends at Test[200], and just the first 50 are visible within the size of the UITextView.
    Once I tap on the UITextView, keyboard appears and UITextView becomes first responder (editable). Then I go back to the home view using back button on the navigation bar.
    Then again I move back to the text view from the home view,. This time it looks like:
    Test[189] Test[190] Test[191] Test[192]
    Test[193] Test[194] Test[195] Test[196]
    Test[197] Test[198] Test[199] Test[200]
    I would like to display the text from Test[1] whenever the view appears. If the UITextView hasn't become first responder, this doesn't happen and the text starts from Test[1] when it appears. But once the UITextView becomes first responder, the UITextView always displays Test[200] at the bottom of the view when it appears.
    I am not sure but it looks as though some internal state of UITextView changes when it becomes first responder, but isn't reset even after it resigns first responder.

  • Sort an an arrayList by the first element of an array

    Hi,
    I am really struggling trying to sort an arratList of arrays. I have an arrayList
    ArrayList<String[]> myArrayList = new ArrayList<String []>(100);
    Within this array I have may arrays with 2 elements
    String[] myArray1 = {"Peter", "London"};
    String[] myArray2 = {"John", "London"};
    String[] myArray3 = {"Tony", "Birmingham"};
    I add all these arrays to the arrayList and want to sort by the first element of the array. Basically I expect the final arrayList to be in the order of:
    "John", "London"
    "Peter", "London"
    "Tony", "London"
    Thanks
    Peter

    Hi,
    I am really struggling trying to sort an arratList of
    arrays. I have an arrayList
    ArrayList<String[]> myArrayList = new
    ArrayList<String []>(100);
    Within this array I have may arrays with 2 elements
    String[] myArray1 = {"Peter", "London"};
    String[] myArray2 = {"John", "London"};
    String[] myArray3 = {"Tony", "Birmingham"};
    I add all these arrays to the arrayList and want to
    sort by the first element of the array. Basically I
    expect the final arrayList to be in the order of:
    "John", "London"
    "Peter", "London"
    "Tony", "London"
    Thanks
    PeterThis can be done by using
    Collections.sort(myArrayList, new Comparator<String[]>() {
    public int compare(String[] s1, String[] s2) {
    if (s1.length() <1) {
    return -1;
    if (s2.length() <1) {
    return 1;
    return s1[0].compareTo(s2[0]);
    });

  • Why the test report's failure chain only display the first failure?

    Hi All,
        why the test report's failure chain only display the first failure step?how to get all the failure steps in the failure chain?
        Thanks a lot.
    BR
    Johnny

    Did a quick search and came across the following links
    http://zone.ni.com/devzone/cda/tut/p/id/4563
    http://zone.ni.com/devzone/cda/epd/p/id/3326
    Regards
    Ray Farmer

  • WebService problem: only the first element of a string array is returned

    Hello,
    i did the J2EE QuickCarRental tutorial and extended it by some features: I created another entity bean and implemented four new methods in the QuickOrderProcessor. Then i deployed it as a WebService and accessed it using the Visual Composer.
    Everything works fine except the return value of one WebService method. I created a method with the return value String[]. But the Visual Composer reads it as String. Only the first element of the resulting string array is displayed. Although the test at the web-page http://<server>:<port>/QuickCarRentalService/Config1 displays the whole string array with all its elements. What did i wrong?
    Another problem is that after deploying the J2EE-Application with new WebService methods the changes are not visible inside the visual composer. Although the test at the web-page http://<server>:<port>/QuickCarRentalService/Config1 displays the changes. Do i have to restart the WebService system in the portal content? If yes how can i do that?

    Here are details about setting up and using web services and some examples:
    /people/prakash.darji/blog/2006/10/10/external-web-service-proxy-configuration-for-visual-composer

  • Is it possible to bind the first element in a collection in a datagrid?

    I have a datagrid and I need to bind a property in the first element of the collection of my datasource object. By the momento I am using a converter:
    <DataGridTextColumn Header="MyValue" Binding="{Binding Converter={StaticResource myConverter}}"/>
    But I would like to avoid the need to use a converter, so I have tried this:
    <DataGridTextColumn Header="MyValue" Binding="{Binding MyCollectionProperty.ElementAt(0).MyValue}"/>
    Is there any way to do it?

    You cannot call ElementAt(i) from the XAML because it is a method.
    MyCollectionProperty[0] will certainly get you the first value of the MyCollectionProperty collection provided that the type has an indexer.
    If you want to be able to this without using a converter you must change the type of the property from ICollection<T> to for example IList<T>.
    You could create a wrapper property (potentially in a partial class definition) and bind to this one:
    //old property:
    public ICollection<YourType> MyCollectionProperty {
    get;
    set;
    //new wrapper:
    public IList<YourType> MyCollectionPropertyWrapper {
    get {
    return new List<YourType>(this.MyCollectionProperty);
    <DataGridTextColumn Header="MyValue" Binding="{Binding MyCollectionPropertyWrapper[0].MyValue}"/>
    ICollections are not very XAML friendly and you cannot bind to the first item of an ICollection using an indexer or ElementAt(0) or any other direct way.
    Please remember to mark all helpful posts as answer to close your threads.

  • ArrayList drops the first element

    I hate asking for help, but this has me confused.
    I have a code that outputs the elements of an arraylist as text strings to a file. For some reason, the first element of the ArrayList gets dropped, but every other element after gets saved to text perfectly.
    public void writeOut(ArrayList a)throws IOException{
        String[] out=new  String[a.size()];
        for(int i=0;i<out.length;i++){
            out=a.get(i).toString();
    System.out.println("" + out[i]); //test line to see if element has been moved
    I have also tried:
    public void writeOut(ArrayList a)throws IOException{
        String[] out=new  String[a.size()];
        for(int i=0;i<out.length;i++){
            out=(String)a.get(i);
    System.out.println("" + out[i]); //test line to see if element has been moved
    The code is straight forward, the best I can tell...so what am I overlooking? I am assuming that my array needs to be primed or something first. I suppose I could make the array one bigger and put some bogus value in the first element...That doesn't really seem the right way to do it though.

    I didn't notice it either until I tried to pass it an ArrayList with only one string....I must be having a problem where the ArrayList is being created then.
    And that is exactly where the problem was... :sigh:
    Thanks for checking that for me.

  • Creating XML from XSD, Only create The First Element

    Hi,
    I create a XML File from a xsd schema by this way:
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              factory.setNamespaceAware(true);
              factory.setValidating(true);
                   factory.setAttribute(JAXP_SCHEMA_LANGUAGE,W3C_XML_SCHEMA);
                   factory.setAttribute(JAXP_SCHEMA_SOURCE, new File(MY_SCHEMA));   
                    DocumentBuilder documentBuilder =factory.newDocumentBuilder();
              documentBuilder.setErrorHandler(new SimpleDOMHandler());
              Document parse = documentBuilder.parse(new File(MY_XML));The first lines of the schema:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://gencat.net/scsp/esquemes/peticion"
         elementFormDefault="qualified" attributeFormDefault="unqualified"
         id="Peticio" xmlns:p="http://gencat.net/scsp/esquemes/peticion">
         <xs:element name="Apellido1">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:maxLength value="40" />
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="Apellido2">
            .............................The problem is that the created document only have the first element "Apellido1". I dont know if it is a wrong xsd, or i'm using a bad way to do it.
    Thanks a lot, and apologize for my english

    Hi,
    Is it possible to create and populate XML from an XSD
    without knowing what the XSD elements are beforehand
    (all the examples appear to know what the input XSD
    will be, and therefore know what the set and get
    methods should be called)? I think it is possible--you would have to recompile each time (unless you can dynamically recompile, which would be neat), but using the classes getMethod() function, you can list all the methods. You would then have to do some tricky logic to determine which of the getMethods you want (for example NOT getClass()), and you can basically call them in sequence. You also need to worry about handling lists & recursively call xxxType classes.
    I'm experimenting with this, and it can get a little frustrating because there are a lot of odd cases to handle (for example, while setting the elements of a list, you need to actually get the list & add elements to it), but I think it's possible.
    >
    Can a user browse for an xsd to input, and the java
    will dynamically create the get methods, and be able
    to create instances and populate variables before
    converting to XML?
    What I'm puzzled about is where you'd get the data to populate the variables? Perhaps a database, or a bean? If you just want to make a test xml file, then it doesn't matter, but with real data, I think you'd still have to change how you actually get the variables you want to populate the xml file with, right? In other words, if your schema changed, the parameters you're passing to the set methods would change as well.
    Maybe we'll see some more packages in the future to make this task easier.

  • To display the WBS elements for last one year

    Hi All,
        Im displaying the details of all active employees. I need to display the WBS elements of all active employees for the last one year alone. Can anybody help me out to get this...
    Regards,
    Surya

    Hi,
    select all the PERNRs with
    BEGDA and ENDA as per ur req
    to check if they are active or not
    use the FM
    HR_BEN_US_CHK_TERMINATION
    then take all the active PERNRs and use
    them to query PRPS table with
    OBJNR = activePERNR

  • Web graphic is not displayed the first time

    Hi all
    I have a strange issue with some users.  The first time that they run the qry in the web, the chart is not diplayed, only is displayed a big "X" and the error msg is the msg below; but when they refresh, the chart is displayed ok.
    How can I solve it?
    Web application processing terminated
    Diagnosis
    The system had to terminate processing of the Web application.
    The reason could be that the system was no longer able to find the Web application server session.
    System Response
    Processing the navigation step is not possible.
    Procedure
    Call up the Web Application again.
    Note: Use the start URL and not the URL that is currently displayed in the Web Browser.
    Procedure for System Administration
    Notification Number BRAIN 278
    Thanks in advance!

    From HTML pass to jsp with post, then from jsp pass the same data to another jsp with parameter attached to the file URL, so method is "get":
    top.location="../filename.jsp?path="+path;

  • Only display the first character issue

    Hi,
    I'm using CR 2008 to generate reports.
    I use oracle database.
    I use a stored procedure to get data and everything working fine ,it return correct data.
    I have five details section but i display one details section and i suppress others
    My issue is execute the rpt file to presssig F5 key;   string type record is only able to print the first character on the preview.
    eg: record with value 'ABCDE', after printed on rpt file, only character 'A' was printed on the preview.
    if i verify database, it display correct data but a few times later problem occurs again
    Anyone know how to fix it?

    if you create a blank report as follows , you will take same error
    my reports section;
    section - formula fieds 
    a - - - - a b f g
    b - - - - a b e f g
    c - - - - a b c e f g
    d - - - - c f g
    e - - - - d e f g
    my details sections suppress formula;
    if {CR_TEST.CODE}=1 then false else true
    if {CR_TEST.CODE}=2 then false else true
    if {CR_TEST.CODE}=3then false else true
    if {CR_TEST.CODE}=4 then false else true
    if {CR_TEST.CODE}=5 then false else true
    my procedure is just like this;
    CREATE OR REPLACE PROCEDURE CR_TEST(
       P_MONTH IN VARCHAR2
    , P_YEAR IN VARCHAR2
    , CODE IN NUMBER
    , P_CURSOR OUT GP.REF_CURSOR
    IS
    BEGIN
       IF CODE = 1
       THEN
          OPEN P_CURSOR FOR
             SELECT A
                  , B
                  , 'X' C
                  , 'X' D
                  , 'X' E
                  , F
                  , G
                  , CODE CODE
               FROM CR_TEST_TABLE
                                 --WHERE conditions
       ELSIF CODE = 2
       THEN
          --A, B, E, F, G
          OPEN P_CURSOR FOR
             SELECT A
                  , B
                  , 'X' C
                  , 'X' D
                  , E
                  , F
                  , G
                  , CODE CODE
               FROM CR_TEST_TABLE
                                 --WHERE conditions
       ELSIF CODE = 3
       THEN
          OPEN P_CURSOR FOR
             SELECT A
                  , B
                  , C
                  , 'X' D
                  , E
                  , F
                  , G
                  , CODE CODE
               FROM CR_TEST_TABLE
                                 --WHERE conditions
       ELSIF CODE = 4
       THEN
          OPEN P_CURSOR FOR
             SELECT 'X' A
                  , 'X' B
                  , C
                  , 'X' D
                  , 'X' E
                  , F
                  , G
                  , CODE CODE
               FROM CR_TEST_TABLE
                                 --WHERE conditions
       ELSIF CODE = 5
       THEN
          OPEN P_CURSOR FOR
             SELECT 'X' A
                  , 'X' B
                  , 'X' C
                  , D
                  , E
                  , F
                  , G
                  , CODE CODE
               FROM CR_TEST_TABLE
                                 --WHERE conditions
       END IF;
    END;
    Edited by: assaulter on Oct 12, 2011 11:50 AM
    Edited by: assaulter on Oct 19, 2011 1:50 PM

  • How to display the first page alone first and two pages (back and front) then ?

    Hi
    I use acrobat 9 (beginner).
    I have a document which should be displayed "as a book", ie two pages on the screen at the same time, the back of the first sheet and the front of the second one.
    The problem I have is to manage to display the cover sheet as a single page (alone) and then to have the dual page layout as described above.
    How could I do that ?
    Thanks for your help
    Regards
    Fanch

    Hi Bernd
    Thanks a lot.

  • How to display the first node in a nested folder?

    If my navigation structure has nested folders and the first page node is in a nested folder. Is it possible to have user click the outer folder and the first node displayed in the content area?

    Hi there,
    please refer to the document "Installing Patch 4 for Enterprise Portal 6.0 SP2" (EP6SP2Patch4_install_v5.pdf) to be found on Service Marketplace; there: "6.3 Navigation Enhancements", there: "6.3.2 Default Entry for Folder" & "6.3.4 DTN: Clicking Folder Name Launches First Node".
    This should answer your question if you think about nesting with one level (I don't think it works over more levels, imagin Folder A only with subfolders, for instance Folder AA with a page AAA under it. Clicking on A will not open AAA, I think, even if this is the first "displayable" element; but I didn't check it out).
    Hope it helps
    Detlev

Maybe you are looking for

  • I need urgent help with the GPS

    i've ask my family to buy Nokia n 97 from syria,while i live in cyprus,how ever i got the phone with a card inside the box says: this nokia device has been specially designed and manufactured for this market.the satandard GPS features have been disab

  • How do I delete a large text message I sent that glitches the message app?

    I just recently sent a REALLY large text message to my friend, but I don't think she actually got it. Since I sent this really big text I can't open the app for messages. Well, I can but it is frozen in the convo I sent the text in and after about 3

  • Display problem in 5800 xpress music

    I had purchased a 5800 xpress music in April 2010.  For the last two months there is some problems in the display.  Sometimes, the display is gone and only lines are seen, when the key pad lock on.  This pevails for long time.  Due to this, I am unab

  • Pop up Window Title Problem

    hi i have Jspx page and in the page i have command link when click on command link a new popup window is opening in that pop up window i have 4 submenus.... when click on each sub menu link page will be open in same pop up window. here when first tim

  • Missing Memo Pad Icon

    After updating to device software 4.5 I no longer have the Memo icon?  Any idea how to get it back?