Sum as NaN when adding numbers

Hi All,
I am getting the total as NaN when I am summing up the totals.
e.g : I have 4 number 1) 4567,9
2) 300
3) 100
4) 100
when I am performing sum(4567,9+300+100+100) I am getting the output as NaN.
The reason is XML doesn't treat "," seperated value(4567,9) as number.
Now my problem is How to remove the formatting for a number.
I am not formatting the numbers neither in rtf file nor in RDF report.
Numbers are getting formatted based the responsibility from which I am running.
For example when I am running the report for Sweden I am getting formatted value as 4567,9 which is creating the problem.
Here is the sample XML file
<G_DISTR>
<CUST_NBR>A002933</CUST_NBR>
<CUST_NAME>LINGMERTHS RESEBYRÿ AB</CUST_NAME>
<PER01>0</PER01>
<PER02>0</PER02>
<PER03>0</PER03>
<PER04>0</PER04>
<PER05>0</PER05>
<PER06>0</PER06>
<PER07>0</PER07>
<PER08>0</PER08>
<PER09>0</PER09>
<PER010>0</PER010>
<PER011>-90194,5</PER011>
<PER012>0</PER012>
<TOTAL>-90194,5</TOTAL>
</G_DISTR>
Any Help would be greatly appreciated.
Thank and Regards,
Naveen.

From Metalink document,
Symptoms
BI Publisher (formerly known XML Publisher) is showing page total as NaN (Not-a-Number) even though there is no NULL value in the elements used for calculating the total.
Cause
Numeric data in XML file is in format "nnn,nn".
To do arithmetic operations, XPath requires data in canonical format, that is, "nnn.nn". The result of adding 2 or more strings ("nnn,nn") can't be a number and thus it is marked as NaN (Not-a-number).
One of the possible reasons why the data was not in canonical format is that the number was written formatted as string and not as a number. This is what should be checked.
Solution
Change the report generating the XML sample data to generate the numeric data in canonical format
"nnn.nn".
For example, for an XML element PRICE_ELEMENT, it should be changed from:
<PRICE_ELEMENT>20,52</PRICE_ELEMENT>
to:
<PRICE_ELEMENT>20.52</PRICE_ELEMENT>

Similar Messages

  • Precision error when adding numbers in double

    i have the following code
    double a,b;
    a=98.1;
    b=1.6;
    c=a+b;
    System.out.println("Answer is "+c)
    from the above code, answer c should be 99.7. However, the result shown by c is 99.69999999999999.
    May i know why is this happening and how to solve it? i guess this is a known issue and there is solution to handle it.
    Thanks.

    It's a frequent question. If you search this forum you get many hits. Here's another one,
    http://forum.java.sun.com/thread.jsp?forum=31&thread=542241
    These rounding errors in the bit representation may add up. Check this for example,
    double d = 1.0-0.1-0.1-0.1-0.1-0.1-0.1-0.1-0.1-0.1;
    System.out.println(d);
    The mathematical result is 0.1 but the numerical isn't that at all. It tells you to avoid incrementing/decrementing floating point variables many times in a loop.

  • Can iOS Numbers copy formulas when adding new rows?

    iOS Numbers table add row is not copying previous cell formulas. Is this supported or not?
    I have a table with lots of columns and all of them have formulas. When I click at the lower left of the table to add a row, none of the new cells have the formulas. I have to manually go through every column and copy the formulas to the new row.
    This is not very practical if you're planning to use Numbers on the go with an iPad. In my case, I have to quickly get a new row ready as needed. I was hoping there is a preference setting somewhere like "copy formulas when adding new row".

    I had the same issue with the added twist that I wanted to reference the created cells in formulas in other sheets. This is what works for me:
    I use a form to enter data. The referenced sheet is set up like this:
    1     Name     Date     ServPayment    SalesPayment     Total
    2     Week1                                                                 =sum (ServPayment,SalesPayment)
    3                                                                                =sum (ServPayment,SalesPayment)
    4     TotWeek1                                                            =sum (Total2,Total3)
    "Total" sums the 2 Payments, TotWeek1 sums the totals.
    In the entry form I never add data to the empty line. In this example, I would start at "Week1" and tap the "+" to add a new form. This creates the line in the referenced sheet with my formulas. As I continue, I always start at the last entry I have made and tap "+".
    When I create a line that does not have the formula on either side, I do not get the formula.
    Hope this helps.

  • Numbers 09 continuing formulas when adding rows

    Numbers 09 - I have a checkbook template but when adding rows at the bottom the formulas do not continue. I have tried adding rows from the last row "Add row below" and also while in the last cell hitting return. Neither of these work. Any suggestions?

    Hi jc,
    The rule is quite explicit: "If all the body cells in a column above the new row contain the same formula or cell
    control, the formula or cell control is repeated in the new row."
    So far there's been some information necessary to solving the problem missing from your posts. Please do the following, and supply the requested information:
    Unhide ALL rows. There are two ways to do this, depending on what was done to hid them.
    a. Click on the Reorganize button. If the checkbox beside "Show rows that match..." is checked, uncheck it.
    b. If the checkbox is unchecked, or if there are still rows hidden after unchecking it, go to the Table menu and choose Unhide all Rows.
    Click on any cell on the table to activate the table and show the Column and Row reference tabs. Hover the mouse over the tab for Row 1, then click the triangle that appears to open the local row menu. Repeat with rows 2, 3, 4, 5 and 6 until you find the first row whose menu starts with the item shown below. Which row has this menu item on your table?:
    Now click on cell G2 (the first cell containing a balance).
    Select and Copy the whole formula from this cell. Paste it into your reply to this message.
    Repeat step 3 with the formula from cell G3. Paste it directly below the formula from G2, using the example below as a guide:
    G2: (paste formula)
    G3: (paste formula)
    Regards,
    Barry

  • Continuing Index numbers when adding photos

    Does anyone know if it is possible to continue the index numbering when adding additional photos to a folder in which the photos were names with a custom name with index. To be clear, if the last photo in the folder is, for example, 'Big Ben 22', can I add more photos at a later date and have the new ones start at 'Big Ben 23....24....25 etc etc.
    I am finding that it just starts at 1 again and doubles up - ie. there are then 2 x 'Big Ben 1' etc

    Here is something regarding exporting/naming but the naming presets work the same way for importing.
    [http://photo.rwboyer.com/2008/10/28/aperture-2-quick-tip-naming-exported-images >
    RB

  • Is there a way to new when phone numbers have been added

    is there a way to new when phone numbers have been added

    I have a Contact that I created called "Do Not Answer"  All the phone numbers that I do not need to answer are placed within this contact.
    I created a 10-Second-Silence ringtone that is used for this contact.  Set Vibration to "None" and Text Tone to "None" as well.  This will shut down any tones or vibrations if you receive a call or text.
    Add any appropriate "NO' sign as a contact picture if you like as a visual reminder to not pick up the call.  I use this: 
    Any callers listed under this 'Contact' will be eventually sent to your email without disturbing you.  Other then that, there is no easy "Kill-file" within the iPhone of which I am aware.
    Best of Luck

  • TableSorter errors when adding new data

    so here is the deal:
    I am using the TableSorter.java helper class with DefaultTableModel
    from: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.
    in use:
    DefaultTableModel.addRow()
    DefaultTableModel.removeRow() and
    DefaultTableModel.insertRow() methods.
    Error:
    java.lang.ArrayIndexOutOfBoundsException: 5
         at com.shared.model.TableSorter.modelIndex(TableSorter.java:294)
         at com.shared.model.TableSorter.getValueAt(TableSorter.java:340)
         at javax.swing.JTable.getValueAt(Unknown Source)
         at javax.swing.JTable.prepareRenderer(Unknown Source)...
    code problem I:
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        }code problem II:
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        }TableSroter class:
    package com.shared.model;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter()
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel)
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader)
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState()
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel()
            return tableModel;
        public void setTableModel(TableModel tableModel)
            if (this.tableModel != null)
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null)
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader()
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader)
            if (this.tableHeader != null)
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer)
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null)
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer())
        public boolean isSorting()
            return sortingColumns.size() != 0;
        private Directive getDirective(int column)
            for (int i = 0; i < sortingColumns.size(); i++)
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column)
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column)
            return getDirective(column).direction;
        private void sortingStatusChanged()
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null)
                tableHeader.repaint();
        public void setSortingStatus(int column, int status)
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE)
                sortingColumns.remove(directive);
            if (status != NOT_SORTED)
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size)
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE)
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting()
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator)
            if (comparator == null)
                columnComparators.remove(type);
            else
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column)
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null)
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType))
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel()
            if (viewToModel == null)
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++)
                    viewToModel[row] = new Row(row);
                if (isSorting())
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        private int[] getModelToView()
            if (modelToView == null)
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++)
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount()
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount()
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column)
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column)
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column)
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column)
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable
            private int modelIndex;
            public Row(int index)
                this.modelIndex = index;
            public int compareTo(Object o)
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();)
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null)
                        comparison = 0;
                    } else if (o1 == null)
                        comparison = -1;
                    } else if (o2 == null)
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0)
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener
            public void tableChanged(TableModelEvent e)
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting())
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW)
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null)
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter
            public void mouseClicked(MouseEvent e)
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1)
                    int status = getSortingStatus(column);
                    if (!e.isControlDown())
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority)
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y)
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth()
                return size;
            public int getIconHeight()
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer)
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column)
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive
            private int column;
            private int direction;
            public Directive(int column, int direction)
                this.column = column;
                this.direction = direction;
    }any input will be appreciated.
    thanks
    Peter

    The code you posted doesn't help us at all. Its just a duplicate of the code from the tutorial. The custom code is what you have written. For example do you update the TableModel from the Event Thread? Do you update the SortModel or the DefaultTableModel? If you actually provide your test code and somebody has already downloaded the sort classes, then maybe they will test your code against the classes. But I doubt if people will download the sort classes and create a test program just to see if they can duplicate your results (at least I know I'm not about to).

  • CreateTempFile(String prefix, String sufix) is adding numbers to the prefix

    Hi folks,
    When I call createTempFile("filename", ".dat") it is adding numbers to the prefix. In my temporal directory I get a file called "filename34486.dat" instead a file called "filename.dat"! Do you know why ?
    Thanks in advance.

    bifiado wrote:
    Hi folks,
    When I call createTempFile("filename", ".dat") it is adding numbers to the prefix. In my temporal directory I get a file called "filename34486.dat" instead a file called "filename.dat"! Do you know why ?
    Thanks in advance.If you wanted a file named explicitly "filename.dat", then don't use createTempFile - that's for creating, well, temporary files with a (hopefully) unique name so as to not collide with other processes who might also be trying to create temporary files of the same name pattern.

  • NewElementInHierarchy() - Adding New Elements, progressively takes longer when adding multiple siblings

    With my ESTK script, users select model numbers from a list and then the script inserts an element with a model number entered into an attribute, one element for each model selected.
    When adding a large number of elements, each additional sibling element takes a little longer to add then the previous element. Adding 250 elements can take upwards of 3-1/2 minutes or more. While adding 20, 50, or 75 elements happens quickly, without any noticeable duration. It’s somewhere above 110 is where it starts to be noticeable.
    I even used $.hiresTimer and wrote the value to the console for each time a model was added. Since the timer is reset back to zero (0) each time it's called, it was easier to notice that the amount it incremented from one element to the next got progressively larger.
    Any thoughts as to why it’s taking so long or thoughts on what I could do to speed it up?
    The structure looks like this:
    <PartModels>
          <NoteText>Text</NoteText>
          <Model ModelNumber=”ABC01”/>
          <Model ModelNumber=”ABC02”/>
          <Model ModelNumber=”DEF03”/>
          <Model ModelNumber=”DEF04”/>
          <Model ModelNumber=”XYZ01-A”/>
          <Model ModelNumber=”XYZ*B”/>
          <Model ModelNumber=”XYZ500”/>
    </PartModels>
    The script is somewhat straight forward: cycle through an array of the model numbers selected, add a new element for each model number and set it's attribute value to the model number. This is the short version:
    Function InsertModelElements (modelsToIns, insElemLoc, GVdoc) {
         var newEleId;
         var newElemLoc = insElemLoc;
         var elemDef = GVdoc.GetNamedElementDef(“Model”);
         for(var i = 0; i < modelsToIns.length; i++){ // modelsToIns is the array of models selected
              newEleId = elemDef.NewElementInHierarchy(newElemLoc); //ElementLoc based on NoteText first, last, or not present
              SetAttribute(newEleId, "ModelNumber", null, modelsToIns[i]); //more robust function to set attribute
              /*Which also works for setting attribute*/
              //var vattributes = newEleId.GetAttributes();
              //vattributes[0].values[0] = modelsToIns[i];
              //newEleId.Attributes = vattributes;
              /*At one point I tried using a new element location from the last inserted element, no change*/
              //var newElemRange = setElementSelection(GV_doc, EleId); //function that returns range
              //newElemLoc = newNewElemRange.end;
    Any help is appreciated.
    Sincerely,
    Trent

    Thanks Russ,
    I seriously considered trying copy/paste and started to modify the code to do so. But I couldn't let it go, the answer had to be right there in front of me, just it's been too long since I've worked with this stuff, I'm not able to see it. Then it dawned on me what is happening.
    In an earlier test, I placed a timer on each action that is looped through. For example, I start with an container element that has 200 children elements, each with a specific/unique model number attribute. All 200 existing elements are deleted and then replaced with 250 new elements with a different value for the model number attribute. The timer was placed after the Element.Delete() method and ElementDef.NewElementInHierarchy() method. What I noticed with the timer is that each element deleted was deleted faster than the previous element (so it progressively took less and less time to delete an element). And of course the opposite was noticed for inserting elements, each element inserted took longer than the previous element inserted.
    These elements can be inserted in two areas of the structure, one of the areas has fewer format rules that impact the formatting and is actually a little quicker. This led me to the cause being the EDD format rules. The area that takes longer has quite a few extensive format rules that apply. Every time an element is inserted or deleted, FrameMaker runs through those rules to format the content of the elements. Since the rules apply to parent, first, last, next, previous, etc., FrameMaker has to apply format rules to all the elements in the structure that the rules apply to (which are extremely complex because of the various elements, attribute values, and combinations that can be inserted).
    Removing or thinning down the FormatRules in the EDD, it does get quicker. But each of the FormatRules are needed. So using app.ApplyFormatRules = false; right before the elements are deleted and inserted works great. But the key is to set ApplyFormatRules back to true before deleting the last element to be deleted and before inserting the last element to be inserted, so it will cycle through all the format rules of the EDD for all the elements in the hierarchy those format rules apply to. Setting ApplyFormatRules to true and assigning the ElementDef to the last element also works [EleId.ElementDef = GV_doc.GetNamedElementDef(insElemType);], but only before any other functions are performed or different elements are added.
    doc.Reformat() isn't going to reformat the content correctly after the fact because the element was created without the format rules, so it just reformats the content of the elements without the format rules.
    The FDK version that was created 10 years ago had the same problem of running slow when a large number of elements were being inserted, but was still an improvement over having to manually insert each element and type in the attribute value, so it was lived with.
    It's now working amazingly fast. I hope my explanation of what I think is happening, including the cause/solution, is understandable.
    Sincerely,
    Trent Schwartz

  • When added a single purchase order the order being duplicated..

    In 2007A SP01 PL10
    When added a single purchase order, the order being duplicated into two different orders numbers in the system..
    the problem is Inconsistent and occurs several times a  day.
    Does anyone know \ heard about the problem??
    Thank You!
    Meital

    Are the duplicated PO's created by the add on, or through the application?
    We do have a customer who is getting duplicated SO / PO/ Cash sale invoices at the rate of a few per month. They have an add on running as well and we have been unable to solve the issue for them.
    The rate did improve after upgrading to SP01, but the issue has not disappeared.
    There was another thread a while ago about someone getting duplicated credit notes, they also had an add on running but the add on was unrelated to credit notes.

  • When adding a folder in the finder window it makes me Authenticate.. how can i change this?

    when adding a folder in the finder window it makes me Authenticate.. how can i change this?
    i am logged into the computer as the root user...
    i know when i upgraded to 10.6 this happened but i cannot remember what i did to fix this
    and it is doint it in 10.7
    message says....
    finder wants to make changes. type your password to allow this...
    MBP 2.66 C2D

    If you need a GUI to change the owner of a file or files, try BatChMod
    Download BatChmod 1.51
    Works on 10.5 and 10.6
    http://www.macchampion.com/arbysoft/BatchMod/Download.html
    Here are similar teminal commands:
    Macintosh-HD -> Applications -> Utilities -> Terminal
    #Your current user is:
    echo $USER
    #Let's assume myuser
    #Or, you can use the id command.
    id
    #Remember, this will be the correct userid.  You need to find the bad userid.
    #You need to look on one of your bad files. To find out your UID and GID do:
    cd ~
    ls -ln
    ls -l
    ls -ln filename-of-bad-file
    Now, compare the output and write down what you find.
    You best use the numeric value of the old userid. In this case it is 501.  Before you do a command that will change files,  you should  list all  the files to be changed.   From an administrator  account, enter the following command:
    sudo find -x / -user 501 -exec ls -l {} \;
    # the system will ask for your log on password.  Type it in.  The letters will not appear on the screen.  Then, press the enter key.
    # adding a -x before the / limits the search to the current file system which will be your startup partition.
    # To stop the display press control-c ( hold down the control key then press c )
    mac $ sudo find -x / -user 501 -exec ls -l {} \;
    -rwxr-xr-x   1 na  unknown  0 Oct 23  2001 /Applications/AppleWorks 6/AppleWorks 6.app/AppleWorks 6
    -rwxr-xr-x   1 na  unknown  0 Oct 23  2001 /Applications/AppleWorks 6/AppleWorks 6.app/Contents/MacOS/AppleWorks Essentials
    -rwxr-xr-x   1 na  unknown  0 Oct 23  2001 /Applications/AppleWorks 6/AppleWorks 6.app/Contents/MacOS/Clippings
    -rwxr-xr-x   1 na  unknown  0 Oct 23  2001 /Applications/AppleWorks 6/AppleWorks
    ^C
    This command will change the ownership of a file.
    Any file or folder with a userid of 501 is changed to 1000.  Your numbers will differ.
    sudo find -x / -user 501 -exec chown 1000  {} \;
    #And you need to do this from an administrator id.
    More examples:
    sudo find -x / -user 501 -exec chown 5464 {} \;
    sudo find -x / -group 20 -exec chgrp 211 {} \;
    #combined change of uid & gid
    sudo find -x / -user 501 -exec chown 5464:211 {} \;
    Hope this helps a little.
    Robert

  • When adding folders to iTunes 11, they don't show up in the library.  On one folder add, it created a playlist (not what I wanted).  On the second folder, it shows nothing.  Never seen this before.  Advice?

    I added my first folder of MP3s and it created a playlist, but didn't show up in the library.  When adding a second folder, it didn't show up anywhere.  I can do a search for them in the search window, and it finds/plays them, but I want to be able to browse them in my library.  These are not MP3s downloaded from iTunes, but are personal files located on my hard drive.  Can anyone help?

    I have a Dell that's running Windows XP. I have found that itunes is very temperamental. this works most of the time... except on my son's computer that's running Windows Vista.
    Go to your library in iTunes. Then go up to file and try one of the options (import, add folder to library, or add file to library).
    Adding a folder is the least work. You can add all the files from a folder with one click... if it works. Remember that itunes is temperamental.
    If that doesn't work, try adding a file. The problem with that is that you have to go through the whole process for each and every file (song, movie, etc).
    Sometimes the only thing that works is to import.
    I haven't gotten iTunes to work on my son's computer (Windows Vista).
    I can't get support from apple in any way at all! They are good about creating electronics that appeal to us But they are lousy at support. If anyone figures out how to access support (where you can actually contact Apple) please let me know ([email protected]). I've been trying for 6 months.

  • Mail compose window jumps to back when adding address. As soon as I add a single character to the address window of a new mail message, it pops  under all other existing windows. If I have others open...and who doesn't? I have to then close them all.

    So.....deeply....disappointed by Lion...
    It honestly gets in the way of getting things done.
    When was the last time you had an upgrade, in any program or  OS that caused an immediate productivity drop?
    Mail windows, when adding a new address, pop under to become the lowest window in the stack...before you are done composing...
    no extra clicks..just adding ONE character to the actual address bar does it.
    Trying to add files to an online content management system is hard...it's hard because when you attempt to add the file, it disappears from
    the list, so a search must be conducted...oh not a search of your hard drive...no...it has to include ALL FILES and that takes a while, showing
    files totally unrelated to what you need or in whatever that view is, showing everything from movies to documents, to a whole range of other stuff
    that is irrelevant to what is being sought.
    I can get used to the disappearing icon tool bar...but the message threading in Mail is so strangely bad it's hard to describe. So you send out an email,
    and it had 5 points...but that was 3 emails before...A reply comes in addressing those 5 points but saying something like ..."I disagree with point number 4"
    Unless you have total recall the thread shows you only incoming mail and the LAST most recent folded up message you sent. You are forced to go digging
    into sent mail to see what that point you made 8 days eariler actually was...
    I am pleased that I don't have to have Launchpad (honestly the silliest 'feature' I've ever seen on a computer) in the dock and see no point in the juvenile Mission Control (the naming scheme is odd and reminiscent of Junior Spaceman...how ironic that we end America's manned launch capability at the same time as Launch Pad and Mission Control, both throwbacks to the 60's are added to an OS). In any case both are virtually useless tools. One, replacing the mildly useful Spaces and the other just genuinely useless.
    I'm going to give Apple until the second bug fix...but I can tell right now that Snow Leopard was a far more robust OS. The thousands of posts about this may rise to the level of AntennaGate...I hope so...It seems the only way to get Steve (for whom I have now honestly lost respect for the FIRST TIME) to address the issues is to embarrass the company publicly. Lion is a broken system, poorly conceived...and proof that the Apple methodology of no widespread user testing can and does fail. This needs to get fixed. Soon.

    It seems to have something to do with profile manager.
    I get stack traces in the "system messages" logs for the "Server" application, grrrr.
    I'll get that info and attempt to submit a but report tonight.

  • How can I see more than 100 users when adding users to a node?

    When adding new users through the User Management interface, only the
    first 100 entries are listed. How do I increase the number of entries
    so I can see the next hundred (or more) users? Is this done via the server
    configuration parameter maxsearchresult?
    <P>
    The GUI Add User to Node option was meant for infrequent adds in smaller
    environments. In large deployments (more than 100 user adds at a time), you
    should be using the command line script "unidsattach". See the Administrators
    Guide for more details on the command.
    <p>
    The parameter, maxsearchresult, is meant to limit the number of users that can
    be returned on a search request by the calendar client. For example, if you have
    1000's of calendar users and someone tries to search for all of them, this
    parameter will make sure that the user is not left waiting a long time for
    results.

    In Settings > Notification Center, try turning "on" all the six buttons under "Today View".  Also turn "on" the top two buttons under "Access on Lock Screen".  Doing that should show you "Tomorrow" at the bottom of Noticiation Center.

  • On a Mac, in Adobe Photoshop CC 2014, when adding audio to an edit, i get the message "Could not complete your request, because Dynamiclink is not available". When performing the exact same operation in Adobe Photoshop CC, i can add audio in the same way,

    On a Mac, in Adobe Photoshop CC 2014, when adding audio to an edit, i get the message "Could not complete your request, because Dynamiclink is not available".
    When performing the exact same operation in Adobe Photoshop CC, i can add audio in the same way, no error message. Any ideas to solve this, anyone? Would be greatly appreciated.

    I tried to update and it keeps telling me to get the Application Manager. And this is what happens
    Adobe Application Manager failed and it told me to download the Adobe Support Advisor.
    Adobe Support Advisor told me that there was an issue:" cpsid_82829s1: "A restart is pending," bootstrapper error has occurred. "Token Number: 40-87772-063201122012
    I followed the instructions it gave me to correct this issue:
    If you receive the error "Installer has detected that a machine restart is pending. It is recommended that you quit the installer, restart try again," do the following:
    #Restart the computer and try the installation again.
    #If the installation fails, delete the InProgress registry key: 
    Disclaimer: This procedure involves editing the Windows registry. Adobe doesn't provide support for editing the registry, which contains critical system and application information. Make sure to back up the registry before editing it. For more information about the registry, see Windows registry information for advanced users on the Microsoft support site, or contact Microsoft. 
    Launch Windows Registry Editor.
    (Windows XP) Choose Start > Run, type regedit in the Open text box and click OK.
    (Windows Vista/ Windows 7) Choose Start, type regedit in the Search box, and press Enter.
    Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager.
    Delete the InProgress key.
    I was not able to find the "InProgress" key.

Maybe you are looking for

  • My kids pushed something and this message comes up on a black screen: Darwin/BSD (new-host-4.home)(console) Login:  What do I do to fix it?

    My kids pushed something and this message comes up on a black screen: Darwin/BSD (new-host-4.home)(console) Login:  What do I do to fix it?

  • Audio cut out and midi miss sync

    Lately I have been getting audio cut out, and the missing, 'error while trying to sync audio and midi'. I thought it was that I had too many instances of virtual instruments. So I mixed the song down. Imported that into a NEW song, with only one audi

  • Want to laugh? Read my n00b question..

    Hi, Ok, I found out that the a class contained in a Jar file I downloaded contains some methods I almost could use out of the box. I just need to modify one of the methods, and then I am good to go. So, silly me I thought I could make a class of my o

  • PC Suite 7.0.7.0

    Dear Nokia Team, After installation of the latest PC Suite I cannot connect my N73 and 6680 to my XP SP2 system. It says "Fatal error during installation" Nokia xxx USB Phone Parent. What is wrong? How can i fix it? It worked fine with 6.85 but 7.0 r

  • Contents Menu not displaying

    Hi all, I am having trouble viewing a flash help file. I saved the file to a CD and it works perfect on my PC, but when I go to another PC the contents menu is missing when I try to access the file. Has anyone had this problem before? or know what I