Problem with Sorting Detail Records

Hello All,
I have an ODBC connection to our AS400 System and I am able to retrieve records in Crystal. I am trying to perform a sort on the Cost Center field and then on the Salaries Account field. These two fields are Alpha Numeric fields. I went to the Record Sort Expert and selected these two fields. However,the Salaries Account field does not sort. When I do Browse data for the Salaries Account (field 2) it is in Ascending Order. When the report prints the detail records within each cost center (the primary sort) the Salaries accounts do not appear sequentially. For example account 510110 appears before 510105. I do not understand why the Salaries Account would not sort?
I appreciate you input as to why this could be happening and how  I could resolve this? I have exhausted evey thing I could think of but I just cant' get it to sort. You input is much appreicated.
thanks in advance.
Imty.

Hi Abhiash,
I don't see any dashes. The Cost Center sorts fine and is also Alphanumeric. The accounts are 6 digits. When I do Browse Data they appear in ascending order. So, It baffles me why it would be out of sequence when the detail prints out. See output below. Account 510110 appears before account 510105. This is in the account group view.
THIS IS BY COST CENTER AND ACCOUNT GROUPING  *********
11002001     510100     LEE,DONNA R     01/29/2012
Sub Total     510100          
11002001     510110     BEKKAIR,RADIA     01/29/2012
11002001     510110     BROWN,JILLEE S     01/29/2012
11002001     510110     SASPA,MADONNA T     01/29/2012
11002001     510110     THOMPSON,LISA Y     01/29/2012
11002001     510110     VAIL,SHEENA M     01/29/2012
11002001     510110     VANG,CHEN T     01/29/2012
Sub Total     510110          
11002001     510105     COURTRIGHT,EMILY E     01/29/2012
11002001     510105     HUMPHRIES,CHRISTINA L     01/29/2012
11002001     510105     KALIFA-MAMAE,SILEPA T     01/29/2012
11002001     510105     MARTIN,KATHRYN M     01/29/2012
11002001     510105     MEYER,TRACY L     01/29/2012
11002001     510105     RODRIGUEZ,MICHELLE     01/29/2012
11002001     510105     SEXTON,JASMINE N     01/29/2012
11002001     510105     WILLARD,LISA     01/29/2012
Sub Total     510105          
"Total11002001
THESE ARE THE DETAIL RECORDS. YOU CAN SEE  CENTER 510110 APPEARS BEFORE 510105 EVEN THOUGH I HAVE
SPECIFIED COST CENTER AND SALARIES ACCOUNT IN THE RECORD SORT *******
11002001     510100     LEE,DONNA R
11002001     510110     BEKKAIR,RADIA
11002001     510110     BROWN,JILLEE S
11002001     510110     SASPA,MADONNA T
11002001     510110     THOMPSON,LISA Y
11002001     510110     VAIL,SHEENA M
11002001     510110     VANG,CHEN T
11002001     510105     COURTRIGHT,EMILY E
11002001     510105     HUMPHRIES,CHRISTINA L
11002001     510105     KALIFA-MAMAE,SILEPA T
11002001     510105     MARTIN,KATHRYN M
11002001     510105     MEYER,TRACY L
11002001     510105     RODRIGUEZ,MICHELLE
11002001     510105     SEXTON,JASMINE N
11002001     510105     WILLARD,LISA

Similar Messages

  • Problem with Dashboard Details Widget

    Hi!
    I'm using SCOM 2012R2 UR 4 running og SQL 2012R2 with 3 MS. I have problems with the Details widget on my Dashboards. The problem is that when I select an object, no data is showing up in the details widget - see picture.
    I've deleted the "Health Service State" folder on all MS's and restarted them. I've also started the console witn /clearcache without luck.
    In addition I've created an SQL maintenance plan running sp_updatestats every 30. minutes, but it
    still fails...
    What should I do?
    Best regards
    Rune Haugen

    Rune Haugen you are right.
    1) try to restart the opeations console with /clearcache
    2) try to import the following MP again an make sure that their version number is 7.1.10226.1046
     Microsoft.SystemCenter.Visualization.Library.mpb
     Microsoft.SystemCenter.Visualization.Component.Library.mpb
     Microsoft.SystemCenter.Advisor.mpb
     Microsoft.SystemCenter.Advisor.Internal.mpb
     Microsoft.SystemCenter.2007.mp
    Roger

  • Problem with sorting involving user defined types and reports

    Hello!
    I have a problem with sorting involving Reports and user defined objet types.
    I have created the following object types
    CREATE TYPE type_balance_compte AS OBJECT
    NUM_CPT_SEQ NUMBER(8)
    ,NUM_CPT VARCHAR2(35)
    CREATE TYPE TB_type_balance_compte IS TABLE OF type_balance_compte
    At the reports query I use:
    SELECT ...
    FROM table(cast(test_pkg.balance_comptes(:P_num_soc) as TB_type_balance_compte)) c
    The procedure balance_comptes will retrieve data from various tables into the type.
    The report is ordered by a certain string field that usually contains characters and numbers.
    I need to have numbers always before characters, meaning the data should come in this order in the report for example:
    0
    1
    A
    B
    So, before the report query, I have placed a call to DBMS_SESSION.SET_NLS( 'nls_sort', 'binary' ) to guarantee NLS_SORT in case it is originally set to FRENCH.
    The problem here is that even after this call, I have the report ordered like this
    A
    B
    0
    1
    And not the numbers before as it should be.
    To try and find out where the problem was, I have created a table to use instead of the object type described above. In this case, it worked correctly. So all I know by now is that is has something to do with the type or cast, but what exactly? Does anybody now how to solve this without using a table?
    Many thanks
    Ariadne

    I have placed a call to DBMS_SESSION.SET_NLS( 'nls_sort', 'binary' ) why not order directly then:
    SQL> select *
          from table (sys.dbms_debug_vc2coll ('A', 1, '5', 'C', 'a'))
    order by nlssort (column_value, 'NLS_SORT = binary')
    COLUMN_VALUE                                                                   
    1                                                                              
    5                                                                              
    A                                                                              
    C                                                                              
    a                                                                              
    5 rows selected.?

  • Problem with  Creating Info Record

    Hello Gurus,
    I've problem with Creating Info Record
    i tried to create info record for Plant Specific/Purchase Org
    The first Screen General Data is OK
    i entered all the data in the next screen ie
    Purchase Organization Data screen but i'm getting error
    <b>Make an entry in all required fields</b>
    but there is Mandatory Textbox ie "VALID TO" which im unable to select Bcos its Disabled
    pls help me regarding this
    thanks in advance

    Hi
    Have u given the net price. <b>VALID TO</b> is the date until which the price shown in the info record is valid.
    If there is no price that is valid on the current date, the last-valid price is displayed and the date field contains the day before the start of the next validity period (this may be 12.31.9999 if there is no further validity date). If all validit periods lie beyond the current date, the price of the next period is displayed. The date field then contains the end date of this period.
    These validity periods we will maintain Purchse data CONDITIONS while creating info record. Check the validity period for the conditions.
    Hope this will helps u
    Ravi
    Ravikumar Bolla

  • Problem with Master -Details forms in seperate pages

    Hi ,
    Below is the scenario:
    I have Institution and a department tables where there is a foreign key relation between the tables. So now i have two entity objects for the 2 tables and 2 view objects(DepartmentView,InstitutionView) from the entity objects.
    I also have a view link between them.I made a master-detail relation between them in the datamodel using the view link.So my appmodule now has getters for the department view,institution view and viewlink.
    I now have a jsp page "createInstitution.jsp" which contains a form for the institution , i have a "next" button on the same jsp which calls a method in my appmodule class .This methods just inserts the record into the Institution view. In this method i am able to see what the user entered in the form by getting the viewrow record like the below code :
    InstitutionViewRowImpl newInstitutionRow=(InstitutionViewRowImpl) getInstitutionView().first();
    The next button navigates to the next page "listDepartments.jsp" which contains the list of departments that are added. This page has a button "Add Department" which takes to to the "addDepartment.jsp" page which shows a form for adding a department. This page also has a button which calls a method in app module class. The method just inserts the record into the view(DepartmentView)
    Here when i say
    DepartmentViewRowImpl newDepartmentRow=(DepartmentViewRowImpl ) getDepartmentView().first();
    the newDepartmentRow is null.
    Also on the addDepartment.jsp form , i had used a output field to see what the parent id was and interestingly the parent id is 75 which is first institution in the database. It should have been "-10" , a temporary id assigned.
    Can someone please tell me what is the problem with my approach?

    I don't understand why you are using a method on your button to insert the record into the table - An Oracle ADF Form will do the insert for you by default without any coding.
    See the create pages in these tutorials:
    http://www.oracle.com/technology/products/jdev/11/cuecards/adf_set_21/ccset21_ALL.html
    http://www.oracle.com/technology/obe/obe11jdev/11/dev_ui/developuserinterface.html#t2s5
    The method that you are calling just returns the first record in the rowset - I don't see how it has anything to do with actually inserting the data into the table.

  • A Problem With Sorting via Applescript

    Hello everyone. I have always lurked these forums and learnt many things along the way, but this is my first question, and I hope that someone can help me out. I apologise for the huge post.
    I have created a spreadsheet in Numbers that I plan to use for a soccer tournament. There are 8 Groups of 4 teams in the competition, so I have set each Group up on its own sheet in order to record the results of the games. Group 1 is on Sheet 1, Group 2 is on Sheet 2 etc. These results are then fed into a second table on the each page in order to create a competition ladder for each group. So far so good, works beautifully. See image:
    My next step is sorting these tables so that they form a proper "results table" with the best team on top. My wish is to sort the results table in this order:
    Points
    Diff
    F
    Although not very experienced with Applescript, I have written a script to sort all of the 8 sheets so that I don't have to do them one at a time. Unfortunately I find that every second sheet does not sort correctly, even though I am using the same instructions for each seet in my script.
    See here, sheet two:
    Sheet 3 sorts correctly but not sheet 4, sheet 5 is good but sheet 6 bad etc...
    This is my script:
    tell application "Numbers"
              tell table "Ladder1" of sheet "Group1" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder1" of sheet "Group1" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder1" of sheet "Group1" of document "Manu"
      sort by column "g" direction descending
              end tell
              tell table "Ladder2" of sheet "Group2" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder2" of sheet "Group2" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder2" of sheet "Group2" of document "Manu"
      sort by column "g" direction descending
              end tell
              tell table "Ladder3" of sheet "Group3" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder3" of sheet "Group3" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder3" of sheet "Group3" of document "Manu"
      sort by column "g" direction descending
              end tell
              tell table "Ladder4" of sheet "Group4" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder4" of sheet "Group4" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder4" of sheet "Group4" of document "Manu"
      sort by column "g" direction descending
              end tell
              tell table "Ladder5" of sheet "Group5" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder5" of sheet "Group5" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder5" of sheet "Group5" of document "Manu"
      sort by column "g" direction descending
              end tell
              tell table "Ladder6" of sheet "Group6" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder6" of sheet "Group6" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder6" of sheet "Group6" of document "Manu"
      sort by column "g" direction descending
              end tell
              tell table "Ladder7" of sheet "Group7" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder7" of sheet "Group7" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder7" of sheet "Group7" of document "Manu"
      sort by column "g" direction descending
              end tell
              tell table "Ladder8" of sheet "Group8" of document "Manu"
      sort by column "k" direction descending
              end tell
              tell table "Ladder8" of sheet "Group8" of document "Manu"
      sort by column "i" direction descending
              end tell
              tell table "Ladder8" of sheet "Group8" of document "Manu"
      sort by column "g" direction descending
              end tell
    end tell
    Can anybody see any obvious errors with the script? Any info would be greatly appreciated. Thanks!

    First I would look at some items to simplify the script:
    I did NOT run this.
    tell application "Numbers"
              set LadderNumber to 1
              repeat 8 times
           set theLadder to "Ladder" & LadderNumber
           set theGroup to "Group" & LadderNumber
           tell table theLadder of sheet theGroup of document "Manu"
                sort by column "k" direction descending
                sort by column "i" direction descending
                sort by column "g" direction descending
                             end tell
                             set LadderNumber to (LadderNumber + 1)
              end repeat
    end tell
    I don't see a problem with the script.  I suggest adding a dummy table to each sheet and confirming you can set a value in the dummy table from the script (maybe after manually setting the value to some default value).  you can also add print dialogs at each step to see what's happening... like:
    set aValue to <what ever>
    display dialog "The value is: " & aValue
    just some thoughts

  • Problem in sorting the records

    Hi All,
    I have to sort some records based on a key. If the key field is optional then how to sort the records. For example consider the follwing records.
    <row>
          <name>jaya</name>
          <address>hyd</address>
          <material>d</material>
          <units>4</units>
          <price>6</price>
    </row>
      <row>
          <address>ss</address>
          <material>wd</material>
          <units>7</units>
          <price>9</price>
       </row>
    <row>
          <name>radha</name>
          <address>pune</address>
          <material>g</material>
          <units>9</units>
          <price>3</price>
    </row>
    Here name field is used as a key in sorting the records. in the second record name field does'nt exists. All the records that doesnt have the name field shud come on the top and the rest with name field shud come sorted.
    Can anyone please helpout how to solve this problem??

    Jhansi,
    Did u solved the issue? The scenario is lil bit complicated, please consider my below suggestion, if you haven't achieved your results.
    I must really thankful to Michal and all my SDN friends,who guided me to use the logic-using multiple Mapping program in one Interface mapping.
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Ok, let us come to the logic.
    For your problem we need to use two mapping programs.
    <b>Mapping Program 1</b>
    http://www.flickr.com/photo_zoom.gne?id=897495319&size=o
    <b>Mapping Program 2</b>
    http://www.flickr.com/photo_zoom.gne?id=897495327&size=o
    http://www.flickr.com/photo_zoom.gne?id=897495341&size=o
    <b>UDF1 - Testing</b>
    http://www.flickr.com/photo_zoom.gne?id=897495429&size=o
    String temp;
    for(int i=0;i<Name.length;i++)
    for(int j=i1;j<Name.length;j+)
    if(Name<b>[</b>i<b>]</b>.compareToIgnoreCase(Name[j])>0)
               temp = Name<b>[</b>i<b>]</b>;
                Name<b>[</b>i<b>]</b>= Name[j];
                Name[j]=temp;
    for(int i=0;i<Name.length;i++)
    if(Name<b>[</b>i<b>]</b>.equals("0"))
    result.addSuppress();
    result.addContextChange();
    else
    result.addValue(""Name<b>[</b>i<b>]</b>"");
    result.addContextChange();
    <b>UDF 2 - Testin1</b>
    http://www.flickr.com/photo_zoom.gne?id=897495437&size=o
    String temp,temp1;
    for(int i=0;i<Name.length;i++)
    for(int j=i1;j<Name.length;j+)
    if(Name<b>[</b>i<b>]</b>.compareToIgnoreCase(Name[j])>0)
               temp = Name<b>[</b>i<b>]</b>;
                Name<b>[</b>i<b>]</b>= Name[j];
                Name[j]=temp;
          temp = Values<b>[</b>i<b>]</b>;
                Values<b>[</b>i<b>]</b>= Values[j];
                Values[j]=temp;
    for(int i=0;i<Values.length;i++)
    result.addValue(""Values<b>[</b>i<b>]</b>"");
    result.addContextChange();
    <b>Interface Mapping</b>
    http://www.flickr.com/photo_zoom.gne?id=897495361&size=o
    <b>Finally -Results:</b>
    http://www.flickr.com/photo_zoom.gne?id=897498639&size=o (My Data)
    http://www.flickr.com/photo_zoom.gne?id=897498659&size=o (Your Data)
    I hope it helps you!!!!
    I don't know whether this is the correct way or any other simplest way to do so. Also I request our friends to feedback their inpute regarding this logic.
    Jhansi,if you have any doubts in achieving the same, kindly reply back.
    Best regards,
    raj.

  • Problem with updating a record method in a database

    I've searched for the forums for info on this to no avail.
    I am connecting to Access database, using the sun.jdbc.odbc.JdbcOdbcDriver.
    I'm trying to be able to update 2 fields in a record (cost & quantity).
    I have an addrecord method, an update method.
    I can use the addrecord and it works great.
    But (yep, there's always a but!), when I try to update only the 1 or 2 fields on a record, I get a message that says "syntax error in UPDATE statement"
    I've written, deleted and re-written code & I'm going nuts.
    Here are my database methods and the actionPerformed where it calls those methods. Is the error message regarding my UPDATE (sql) syntax?
    Why does it work for adding, but not updating?? It seems my 1st if statement under my "update button" is never gone to... so maybe it's just a problem with my "if" statement.
    Please help me before I go crazy! Thanks!
    //flags
    //snippet of code
    private void enableButtons(boolean flag1)
        boolean flag2 = false;
        if (flag1 == false)
           flag2 = true;
        jbtUpdate.setEnabled(flag2); // was flag1 wouldn't work.
        jbtDelete.setEnabled(flag1);
        jbtAdd.setEnabled(flag1);
        jbtFirst.setEnabled(flag1);
        jbtNext.setEnabled(flag1);
        jbtPrev.setEnabled(flag1);
        jbtLast.setEnabled(flag1);
    //...actionperformed(ActionEvent e)
    else if (e.getSource() == jbtAdd)
        jtfItem.requestFocus();
        enableButtons(false);
        jtfItem.setText("");
        jtfDescription.setText("");
        jtfQuantity.setText("");
        jtfCost.setText("");
        addFlag = true;
      else if (e.getSource() == jbtUpdate)
        double quantity1 = parseInt(jtfQuantity.getText());
        double cost1  = parseCurrency(jtfCost.getText());
        Item itemUpdate = new Item(jtfItem.getText(), jtfDescription.getText(),
        cost1, (int)quantity1);
        System.out.println("update button was clicked");
        //first "if"
        if ((jbtUpdate.isEnabled()) && (addFlag == false))
          InventoryDB.updateField(itemUpdate);
          currentItem = itemUpdate;
          System.out.println("it's going to first if stmt");
        //2nd "if"
        if (addFlag == true)
          InventoryDB.addRecord(itemUpdate);
          currentItem = InventoryDB.moveFirst();
          addFlag = false;
          System.out.println("it's going to 2nd if stmt");
        currentItem = itemUpdate;
        performItemDisplay();
        enableButtons(true);
        System.out.println("it's going to last of update code");
    //method snippets  for database manipulation
    public static void addRecord(Item item) throws SQLException
        String query = "INSERT INTO Items (ItemNumber, ItemDescription, UnitCost, Quantity)  " +
            "VALUES ('" + item.getItem() + "', " +
               "'" +        item.getDescr() + "', " +
            "'" +         item.getCost() + "', " +
               "'" +     item.getQuantity() + "')";
        Statement statement = connection.createStatement();
        statement.executeUpdate(query);
        statement.close();
        close();
        open();
      public static void updateField(Item item) throws SQLException
        String query = "Update Items SET " +// Items (ItemNumber, ItemDescription, UnitCost, Quantity) " +
          "VALUES ('" + item.getCost() + "', " +
          "'" +     item.getQuantity() + "', " ;
    //      "WHERE ItemNumber  = " ItemNumber "'"
    //       "WHERE ItemDescription = " ItemDescription "', ";
          Statement statement = connection.createStatement();
          statement.executeUpdate(query);
          statement.close();
          close();
          open();
       public static void updateRecord(Item item) throws SQLException
        String query = "UPDATE Items SET " +
            "ItemNumber  = '" +      item.getItem() + "', " +
            "ItemDescription = '" + item.getDescr() + "', " +
               "UnitCost =  '" +        item.getCost() + "', " +
            "Quantity = '" +     item.getQuantity() + "', " +
            "WHERE ItemNumber = '" + item.getItem() +  "'";
        Statement statement = connection.createStatement();
        statement.executeUpdate(query);
        statement.close();
        close();
        open();
      public static void deleteRecord(String ItemNumber) throws SQLException
        String query = "DELETE FROM Items " +
            "WHERE ItemNumber = '" + ItemNumber + "'";
        Statement statement = connection.createStatement();
        statement.executeUpdate(query);
        statement.close();
        close();
        open();

    not familiar with this syntax,
    public static void updateField(Item item) throws
    s SQLException
    String query = "Update Items SET " +// Items
    ems (ItemNumber, ItemDescription, UnitCost, Quantity)
    " +
    "VALUES ('" + item.getCost() + "', " +
    "'" + item.getQuantity() + "', " ;
    // "WHERE ItemNumber = " ItemNumber "'"
    // "WHERE ItemDescription = " ItemDescription
    public static void updateRecord(Item item) throws
    ws SQLException
    String query = "UPDATE Items SET " +
    "ItemNumber = '" + item.getItem() + "', " +
    "ItemDescription = '" + item.getDescr() + "', " +
    "UnitCost = '" + item.getCost() +
    etCost() + "', " +
    "Quantity = '" + item.getQuantity() + "', " +one ',' too many
    "WHERE ItemNumber = '" + item.getItem() + "'";

  • Problem with non-matching records

    I have 3 tables - TBL1 is a list of Conditions; TBL2 contains collected data; and TBL3 contains referenced details on the data in TBL2.
    TBL2 contains some matching values from TBL1.
    Ex.
    TBL1
    Condition
    01 Test A
    02 Test B
    03 Test C
    TBL2
    Name, Condition, Value
    Host101, 01 Test A, Yes
    Host101, 02 Test B, No
    Host101, 03 Test C, Yes
    Host102, 01 Test A, No
    Host102, 03 Test C, Yes
    I have them linked TBL1 Left Outer to TBL2 and TBL2 Left Outer to TBL3.
    My desire is to get the complete list of Conditions in TBL1 for each record in TBL2, even where there is no matching TBL1 value in TBL2 - so the report results of the above table data would be:
    Host101
    01 Test A     Yes
    02 Test B      No
    03 Test C      Yes
    Host102
    01 Test A     No
    02 Test B
    03 Test C      Yes
    So even though there is no data returned in TBL2 for Host102, 02 Test B, the record for that entry in TBL1 is still returned in the report.
    Currently I have the report structured as follows -
    {TBL2 Name}
    TBL1 Condition     TBL2 Value
    Seems quite simple, but I must be missing something somewhere, as I am only able to get the data where the records match, so, in the example above, I am getting only -
    Host102
    01 Test A     No
    03 Test C      Yes
    Any assistance would be much appreciated.  Thanks!
    Also, I tried doing a simple new report using just TBL1 & TBL2 and still get the same results (also tried a Full Outer join as well).
    Frustrating .......
    Edited by: Dragon77 on May 17, 2010 2:05 PM

    As I said, I have even tried removing TBL3 to make things even simpler - TBL1 & TBL2 Left Outer joined on the common field.
    I have tried every combination that I can think of.  We're talking on 4 fields in the report -
    Group Header 1 = {TBL2 Name}
    Group 2 = {TBL2 Unique Field}
    Detail = TBL1 Condition     TBL2 Value
    Group Header 1 = {TBL2 Name}
    Group 2 = {TBL2 Unique Field}
    Group 3 = {TBL1 Condition}     {TBL2 Value}
    Detail Suppressed
    No matter what I try, I only get matching records.
    I've gone so far as to just have the minimal 3 fields
    Group Header 1 = {TBL2 Name}
    Group 2 = {TBL2 Unique Field}
    Detail = TBL1 Condition
    Group Header 1 = {TBL2 Name}
    Group 2 = {TBL2 Unique Field}
    Group 3 = {TBL1 Condition}
    Detail Suppressed
    The tables only have the 1 field in comon {TBL1, TBL2 - Condition)
    This just doesn't make sense.  {TBL1 Condition} should have ALL of its entries returned along with any matching records from {TBL2 Condition} - not just where they are equal.

  • Problem with Retrieving Parent records

    Hi
    I am facing some problem with Relation ship tables
    I am able to retrieve all child relation record by using Parent record id, but the other why around is not working that is
    I am unable to retrieve  all parent records by using a child record.
    Please can you help out this..
    find the below sample method which i was trying
    public HashMap<String, Record[]> getMemberRecords(Record[] rec,
                   RetrieveRelationshipsCommand relation,
                   RepositorySchemaEx repositorySchema, String code,
                   HashMap<String, Record[]> returnMap) throws MDMException {
              LOG.debug("calling getMemberRecords");
              HashMap<String, Record[]> returnVal = returnMap;
              LOG.debug("Assigning returnType to default HashMap.");
              try {
                   for (int recordCount = 0; recordCount < rec.length; recordCount++) {
                        LOG.debug("For recordCount = " + recordCount);
                        Record tempRec = rec[recordCount];
                        relation.setAnchorRecord(tempRec);
                        LOG.debug(" setting AnchorRecord = " + tempRec);
                        relation.setLoadRecords(true);
                        LOG.debug(" setting LoadRecords = " + true);
                        relation.setGetChildren(false);
                        LOG.debug(" setGetChildren has setup with  = " + true);
                        relation.setAnchorRecordId(tempRec.getId());
                        LOG.debug(" setting AnchorRecordId = " + tempRec.getId());
                        relation.setRelationshipId(repositorySchema
                                  .getRelationshipId(code));
                        LOG.debug("Before execution relation execute.");
                        relation.execute();
                        LOG.debug("After execution relation execute.");
                        RelationshipGroup group = relation.getRelationshipGroup();
                        LOG.debug("Retrieved Relationship Group.");
                        Relationship[] relat = group.getMembers();
                        LOG.debug("Length = "+relat.length);
                        Record[] tempRecords = null;
                        if (relat != null) {
                             int length = relat.length;
                             LOG.debug("Length = "+length);
                             tempRecords = new Record[length];
                             for (int count = 0; count < length; count++) {
                                  tempRecords[count] = relat[count].getMemberRecord();
                        if (tempRecords != null) {
                             LOG
                                       .info("Records size is not equal to Null So Calling recursive getMemberRecords.");
                             returnMap = getMemberRecords(tempRecords, relation,
                                       repositorySchema, code, returnMap);
                        LOG
                                  .debug("Setting HashMap Value Values with Parent ID, records[]");
                        returnVal.put(tempRec.getId().getString(), tempRecords);
              } catch (SessionException se) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(se.getMessage());
                   ec.setErrorCode("MetadataException : " + se);
                   LOG.fatal(se, se.getCause());
                   se.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (IllegalArgumentException iae) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(iae.getMessage());
                   ec.setErrorCode("MetadataException : " + iae);
                   LOG.fatal(iae, iae.getCause());
                   iae.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (CommandException ce) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(ce.getMessage());
                   LOG.fatal(ce, ce.getCause());
                   ce.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              LOG.debug("Before returning from getMemberRecords");
              return returnVal;

    Hi
    I am facing some problem with Relation ship tables
    I am able to retrieve all child relation record by using Parent record id, but the other why around is not working that is
    I am unable to retrieve  all parent records by using a child record.
    Please can you help out this..
    find the below sample method which i was trying
    public HashMap<String, Record[]> getMemberRecords(Record[] rec,
                   RetrieveRelationshipsCommand relation,
                   RepositorySchemaEx repositorySchema, String code,
                   HashMap<String, Record[]> returnMap) throws MDMException {
              LOG.debug("calling getMemberRecords");
              HashMap<String, Record[]> returnVal = returnMap;
              LOG.debug("Assigning returnType to default HashMap.");
              try {
                   for (int recordCount = 0; recordCount < rec.length; recordCount++) {
                        LOG.debug("For recordCount = " + recordCount);
                        Record tempRec = rec[recordCount];
                        relation.setAnchorRecord(tempRec);
                        LOG.debug(" setting AnchorRecord = " + tempRec);
                        relation.setLoadRecords(true);
                        LOG.debug(" setting LoadRecords = " + true);
                        relation.setGetChildren(false);
                        LOG.debug(" setGetChildren has setup with  = " + true);
                        relation.setAnchorRecordId(tempRec.getId());
                        LOG.debug(" setting AnchorRecordId = " + tempRec.getId());
                        relation.setRelationshipId(repositorySchema
                                  .getRelationshipId(code));
                        LOG.debug("Before execution relation execute.");
                        relation.execute();
                        LOG.debug("After execution relation execute.");
                        RelationshipGroup group = relation.getRelationshipGroup();
                        LOG.debug("Retrieved Relationship Group.");
                        Relationship[] relat = group.getMembers();
                        LOG.debug("Length = "+relat.length);
                        Record[] tempRecords = null;
                        if (relat != null) {
                             int length = relat.length;
                             LOG.debug("Length = "+length);
                             tempRecords = new Record[length];
                             for (int count = 0; count < length; count++) {
                                  tempRecords[count] = relat[count].getMemberRecord();
                        if (tempRecords != null) {
                             LOG
                                       .info("Records size is not equal to Null So Calling recursive getMemberRecords.");
                             returnMap = getMemberRecords(tempRecords, relation,
                                       repositorySchema, code, returnMap);
                        LOG
                                  .debug("Setting HashMap Value Values with Parent ID, records[]");
                        returnVal.put(tempRec.getId().getString(), tempRecords);
              } catch (SessionException se) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(se.getMessage());
                   ec.setErrorCode("MetadataException : " + se);
                   LOG.fatal(se, se.getCause());
                   se.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (IllegalArgumentException iae) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(iae.getMessage());
                   ec.setErrorCode("MetadataException : " + iae);
                   LOG.fatal(iae, iae.getCause());
                   iae.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (CommandException ce) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(ce.getMessage());
                   LOG.fatal(ce, ce.getCause());
                   ce.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              LOG.debug("Before returning from getMemberRecords");
              return returnVal;

  • Problem with sorting a Column in Advance table .

    Dear Friends ,
    I have a OAF page developed with advanced table region , the table has several columns, now i would
    like to sort a column named "Trial number" which is of the type Number .
    To accomplish this i have given Sort Allowed : True (Property Inspector) . but when i click on the sort button
    i am unable to sort the record . Could you please some one give me some suggestion and help me out .
    Regards,
    Keerthi.k

    No there is no Transient attribute involved , could you please tell me what might cause this error .
    Basically this page is for inserting a record.
    Thanks ,
    Keerthi
    Edited by: user1140193 on Oct 21, 2011 7:15 AM
    Edited by: user1140193 on Oct 21, 2011 7:16 AM

  • Problems with Master-Detail Form not retrieving Detail Rows

    Portal 3.0.7.6.2 on NT
    I am having problems with a Master-Detail Form not retrieving Detail Rows. Sometimes it retrieves all, sometimes about 50%, the majority of the time it's not retrieving any. If it never retrieved any I would suspect that the 'join' condition was wrong but that isn't the case. I didn't have this problem with a prior MD Form I created. I have tried re-creating the MD Form but I get the same problem.
    Is anyone having similar problems/is this a know bug??
    Any help or thoughts are appreciated.

    I experienced performance problems. The simpiest MD form takes about 10 secs. to requery. I's not answer to your question, but there is more problems with this concept.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Michael Finch ([email protected]):
    Portal 3.0.7.6.2 on NT
    I am having problems with a Master-Detail Form not retrieving Detail Rows. Sometimes it retrieves all, sometimes about 50%, the majority of the time it's not retrieving any. If it never retrieved any I would suspect that the 'join' condition was wrong but that isn't the case. I didn't have this problem with a prior MD Form I created. I have tried re-creating the MD Form but I get the same problem.
    Is anyone having similar problems/is this a know bug??
    Any help or thoughts are appreciated.<HR></BLOCKQUOTE>
    null

  • Prime Infrastructure 2.1 problem with sorting devices in device groups

    Hi,
    I have a problem with prime infrastructure, namely prime is not doing appropriate sorting of devices in default device groups.
    Example: device type > routers > Cisco 2800 series integrated services routers - under shown results there are Cisco 2911 Integrated Service router, Cisco 2901 etc.
    Any solution? 
    Tnx

    Hi all:
    I have tried using Designing Monitoring Template to set the Health Check Polling time from default 15 minutes to 5 minutes and also tried also 1 minute.
    The result is 5 minutes is working but 1 minute is not working.
    May I know any one can help on this?
    Many thanks!
    Best regards,
    tangsuan

  • Still having problems with sorting playlists

    I asked these questions a couple weeks ago with no response.
    1. I am trying to create a playlist using the latest version of ITunes that is similar to the Today's Hit Music playlist I set up earlier this summer. The 90s music playlist that came with ITunes and this playlist work fine. However, any new playlists created since the upgrade to ITunes 11 do not. In the above scenario where I set up a playlist that only has one rule and that rule is year is greater than whatever, ITunes refuses to sort the playlist by year then by artist, instead sorting the entire playlist by artist. My Today's Hit Music playlist, on the other hand, sorts with the year on top, so every song that I have allowed in the playlist is sorted by year. For example, B.O.B, Pitbull, Taio Cruz and Usher have songs from 2010 in the playlist. Their songs are all sorted alphabetically by artist, then by album as they should be. Then Pitbull, New Boys, and Hot Chelle Ray all have songs from 2011. Under the old system, these would be right below the songs from 2010, but in the new system they are mixed in with the 2010 songs, so Pitbull could have 2 songs back to back that did not come out in the same year. How can I fix this?
    2. I have a playlist set up for songs that are not in any other playlist. I had to recreate this playlist the last time I reset my plays because my phone wouldn't remove the songs that were added to the playlist since its creation from the list when it was supposed to. Now however, I am having the same problem with it as I was having with the last playlist. With the old system before ITunes 11, if What I Want by Daudtrey was the first song in that playlist, it would always be the first song, creating a sound that sounded like it was on shuffle, which I thought was cool. Now, it just sorts alphabetically by artist regardless of when it was played. How can I tell ITunes to not rearrange this playlist and just add all new songs to the end?

    I don't know how to do this without using a mouse point.
    This may help, http://www.computerhope.com/issues/ch000542.htm
    As for question #2, you call tell how iTunes is sorting songs by the up or down arrow next to a header name.
    Even the original order that the songs were entered or date added or last played can be sorted.
    Much easier with a mouse or touch pad.

  • Problems with editing details on posted Podcast

    I have just started into the Podcasting world and am becoming more and more confused. I am using a website podbean.com to place my Podcast's on and then from there I a linked that URL to iTunes. My Podcast has been accepted, but now I can't figure out how to edit the information on the iTunes Store when I follow the link to my Podcast (description, website link, etc.). Also, I am not able to find my Podcast when I search in the iTunes Store.
    Any ideas?

    As you have "just started into the Podcasting world" why not give Apple's iWeb a try? ...It's in the iLife'06 suite of applications. As you might expect, iWeb and its dedicated podcast web-pages integrates well with iTunes. And if you have a .Mac account you can republish your podcast with updated "details" with just one click. The following thread may be helpful...
    http://discussions.apple.com/thread.jspa?threadID=806070&tstart=0

Maybe you are looking for

  • I cannot print on my Canon MF-4350d after upgrading to Mountain Lion.

    I previously had Snow Leopard and printed on my Canon MF-4350d with no issues.  After Mountain Lion was installed, I get an error message "Failed to read module.  Re-install.: 20600"  I went to the Canon website and downloaded the most current driver

  • Help with starting raid on the k9a2 platnium

    ok well i just got a k9a2 platnium specs- amd 9950 BE edition 4gb of 800mhz ddr2 cas 3 2x 80 gb hard drives 1x 640gb hard drive ati hd 4870 k9a2 platnium 750 watt corsair psu ok. i finished my computer. and i wanted to raid the two 80's. but for some

  • Partial payment by general ledger account assignments

    Hi Experts, I am using a scenario for Partial payment by general ledger account assignments Transaction code FMPP. I have done a vendor invoice with two line item having different FUNDS. When I try to do partial payment using FMPP it is showing me on

  • ME_FW_INSTALL

    When I try and launch the MI client installer I am getting the following error from the URL http://<fqdn>:8000/sap/bc/bsp/sap/me_fw_install/install.htm Business Server Page (BSP) error What happened? Calling the BSP page was terminated due to an erro

  • Type Tool/black document window issue.

    When I use the type tool in PS CC, the document goes black and becomes unuseable, what's up? (WIN 8) I found some mention of flickering problems in WIN 7 but no changes in my graphics performance software settings helped...