Sorting based on colour

How to sort in numbers based on colour?

Hi namanehta,
Rows can be sorted on the contents of cells in one or more columns. Colour (of fill or of text in the cell) is formatting, not content, and can't be used as the basis of a sort.
If your colours are the result of conditional formatting, you may be able to use the same conditions to determine the content of cells in a single column. If so, then you would be able to sort on that column.
An answer applying this to your document might be possible, but would require a more specific description of the content of your table.
Regards,
Barry

Similar Messages

  • Sorting based on a specific value in Columns

    Hi All,
    Crystal 2008 version I have. And we are connecting to BW queries as source.
    In a crosstab, I want to sort my row values based on a column value.
    For example, in rows I have an element with three values . In column I have only one element(month), with couple of month values. My requirement is to sort rows based on a specific month (Mar'09 for example).
    .....................Jan'09......Feb'09.....Mar'09
    ABC...............10.............323...........33....
    XYZ...............32..............33............11....
    FGH...............5................34.............55...
    But when I try to sort based on the Month, I can not select a specific value(mar'09). And it sorts based on the total value (sum of all months).
    How can I achieve this problem?
    Thanks
    Ozan

    For {Sort Value}, if you wanted to sort on the Jan column, then substitute the field name that your example shows as 10 in row ABC.  For {row value}, substitute the field name that is used in the first column (ABC in the example).
    In other words, take the value that you want to sort on, and put it in front of the value currently displaying as the row header.  Then, sort on the results.
    The purpose of the "000000000.00" is to make the length of the number, when converted to string, a consistent size.  This is needed (a) so you know how many characters to strip off when displaying the row value, and (b) so the records don't sort as 1, 12, 2, 234, 235423, 25, 3, ...
    HTH,
    Carl

  • F110- Check Sort Based on document number

    Hi All,
    We are using the program RFFOUS_C to print check when we are doing the payment run F110.
    Presently, checks are sorted as per vendor name (Name 1) while printing. We need to print check sorted based on document (Invoice) number, field BELNR. SO, that checks are printed in the same order as we have entered invoices.
    But the field BELNR field for sorting is not available in the application REGUH (Correspondence), which is a natural way to check print sorting. (In customizing FBZP, "Payment method in Company Code" form data, Sorting of corrpondence)
    Is there a way, we can sort check based on the invoice number (BELNR). .
    Thanks
    Ron
    Edited by: Ron on Jan 7, 2010 1:34 PM

    Hey Ron,
    In Free Selection tab on F110 tcode, Pick Field name as BKPF-BELNR (Document number). Now create the proposal and do the payment run.
    Thanks
    Raghuram

  • How to sort based on my priority in Activity search view.

    Hi,
    In Activity Search category ddlb should show based on my priority order but its showing default based on ascending order based on alphabetical order. How can I assign the values based on my priority how can I archive this? I want to sort based on my values.
    Component : BT126S_APPT
    View : BT126S_APPT/ApptSQ
    CN : BTQACT
    Attribute : CATEGORY
    can redefine get_v_category in search view please guide me.
    Regards,
    Jemmi.

    method GET_DQUERY_DEFINITIONS.
    *CALL METHOD SUPER->GET_DQUERY_DEFINITIONS
    RECEIVING
       RT_RESULT =
    Method returns value help definitions of advanced search
    The method is called from the advanced search tag as a base of its operation
    Take value help definitions from cache if possible
    NO adjustments are done! - Take the operators as set in vrmc_dq
      FIELD-SYMBOLS: <rt_result> TYPE crms_thtmlb_search_field_info.
      DATA: lv_getter TYPE string,
            lv_cnode  TYPE REF TO cl_bsp_wd_context_node_asp,
            lv_operator TYPE crm_thtmlb_search_operator.
           category  TYPE REF TO cl_bsp_wd_context_node_asp.
      lv_cnode = me->get_dquery_cnode( ).
      IF lv_cnode IS BOUND.
        Delegate operation to advanced search context node
        me->dquery_valuehelps = lv_cnode->get_dquery_valuehelps( ).
        rt_result = me->dquery_valuehelps.
      ENDIF.
      LOOP AT rt_result ASSIGNING <rt_result>.
            IF <RT_RESULT>-FIELD = <category>
            DELETE <RT_RESULT>-DDLB_OPTIONS WHERE KEY '001' OR
            KEY '003' OR
            KEY '005' OR
            KEY '006' OR
            KEY '201' OR
            KEY '401'.
            ENDIF.
        LOOP AT <rt_result>-operators  INTO lv_operator.
          CASE lv_operator.
            WHEN 'NM'. "'EM' OR  'NM' OR 'SW'.
              DELETE <rt_result>-operators INDEX sy-tabix.
            WHEN 'EQ'.
              IF sy-tabix > 1.
                DELETE <rt_result>-operators INDEX sy-tabix.
                INSERT 'EQ' INTO <rt_result>-operators INDEX 1.
              ENDIF.
          ENDCASE.
        ENDLOOP.
        CONCATENATE 'GET_V_' <rt_result>-field INTO lv_getter.
        TRANSLATE lv_getter TO UPPER CASE.                    "#EC SYNTCHAR
        TRY.
            CALL METHOD me->(lv_getter)
              CHANGING
                cs_result = <rt_result>.
          CATCH cx_sy_dyn_call_illegal_method.
        no V-Getter found
        ENDTRY.
      ENDLOOP.
    ENDMETHOD.
    it's showing error Field "<CATEGORY>" is unknown. It is not contained in one of the specified tables nor is it defined by a "DATA" statement. "DATA" statement.

  • Sorting based on attributes

    In a content area folder is there a way to
    sort items based on regular/custom attributes?
    I know that we can sort based on title and size
    Thanks

    Not currently. We're considering this for a future release.
    Regards,
    Jerry
    null

  • Sorting based on two columns in report

    Hi,
    we have one issue on sorting based on two columns in report.
    In the report we are doing sorting on two columns(week_id and stage_name). I have attached the screen shot for the same. The sorting is first done on the week_id and then on the stage_name. The issue comes when we have no data for the stage 1 - Prospect in W1. The stage goes to the second position.
    Please suggest if there is any work around to show the 1 - Prospect stage in W1.
    Regards,
    Ambika Nanda.

    what is w1? where is screenshot? and is stage seoncd sort? if so what is the issue?

  • URGENT - Does Select Query Sort based on RowId ?

    Does Select Query Sort based on RowId ?
    Eg: Select * from Employee;
    RowId primkey name
    aaaa 1 kiran
    aaab 2 kumar
    aaac 3 someone
    Now when i delete the primkey: 2 row.
    I will have:
    RowId primkey name
    aaaa 1 kiran
    aaac 3 someone
    Now when i insert a new record:
    RowId primkey name
    aaaa 1 kiran
    aaac 3 someone
    [Comment: Here the rowid can either be a new one like 'aaad' or 'aaab' is also reused.]
    aaad 4 somename
    My requirement is that the 'aaab' should not be reused.
    Can any one pls suggest some way.

    Dear Friend,
    Plese gothrougth once following steps... (One by One)
    Hope you can understand how Rowid Creating and Updting in you table.
    SQL> select rowid,enumber from t;
    ROWID ENUMBER
    AAAJ4oAABAAAWlyAAA 1
    AAAJ4oAABAAAWlyAAB 2
    AAAJ4oAABAAAWlyAAC 3
    AAAJ4oAABAAAWlyAAD 4
    SQL> select rowid,enumber from t where enumber = 2;
    1 row deleted.
    SQL> insert into t values(9):
    1 row created.
    SQL> select rowid,enumber from t;
    ROWID ENUMBER
    AAAJ4oAABAAAWlyAAA 1
    AAAJ4oAABAAAWlyAAC 3
    AAAJ4oAABAAAWlyAAD 4
    AAAJ4oAABAAAWlyAAE 9
    SQL> delete from t where enumber = 3;
    1 row deleted.
    SQL> insert into t values(3);
    1 row created.
    SQL> select rowid,enumber from t;
    ROWID ENUMBER
    AAAJ4oAABAAAWlyAAA 1
    AAAJ4oAABAAAWlyAAB 3
    AAAJ4oAABAAAWlyAAD 4
    AAAJ4oAABAAAWlyAAE 9
    Regards,
    G V Sreenivasulu

  • Table Sorting based on Column Selection

    Dear All,
    I am using an AbstractTableModel. I would like to implement the sorting based on Column selection. Could anyone help me in this please.
    Thanks in advance,
    Regards
    Irfaan

    check this
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.UIManager;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumnModel;
    import java.awt.Component;
    import java.awt.GridLayout;
    import java.awt.Insets;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.util.Hashtable;
    public class TableSorter extends JPanel
        private boolean             DEBUG       = false;
        private Object[]            columnNames = { "First Name", "Last Name", "Sport", "# of Years",
                                                    "Vegetarian"};
        private Object[][]          data        = { { "Mary", "Campione", "Snowboarding", 1, 2 },
                { "Alison", "Huml", "Rowing", 3, 4 }, { "Kathy", "Walrath", "Knitting", 5, 9 },
                { "Sharon", "Zakhour", "Speed reading", 6, 10 }, { "Philip", "Milne", "Pool", 7, 11 },
                { "Isaac", "Rabinovitch", "Nitpicking", 8, 12 }, };
        private SortFilterModel     m_modSortFilterModel;
        private TableColumnModel    m_modColumnModel;
        private TableHeaderRenderer m_btnSorterRenderer;
        protected boolean           m_bAbCOC    = true;
        JTable                      table       = new JTable();
        public TableSorter()
            super(new GridLayout(1, 0));
            m_modSortFilterModel = new SortFilterModel();
            m_modSortFilterModel.addMouseListener(table);
            table.setModel(m_modSortFilterModel);
            m_btnSorterRenderer = new TableHeaderRenderer();
            m_modColumnModel = table.getColumnModel();
            for (int i = 0; i < columnNames.length; i++)
                m_modColumnModel.getColumn(i).setHeaderRenderer(m_btnSorterRenderer);
            JScrollPane scrollPane = new JScrollPane(table);
            add(scrollPane);
        private class SortFilterModel extends AbstractTableModel
            int[]           indexes;
            ATSTableSorter  sorter;
            public String[] tableHeadersArray;
            boolean         isAscent = true;
            public void addMouseListener(final JTable table)
                table.getTableHeader().addMouseListener(new MouseAdapter()
                    public void mouseClicked(MouseEvent event)
                        int tableColumn = table.columnAtPoint(event.getPoint());
                        m_btnSorterRenderer.setPressedColumn(tableColumn);
                        m_btnSorterRenderer.setSelectedColumn(tableColumn);
                        if (TableHeaderRenderer.DOWN == m_btnSorterRenderer.getState(tableColumn))
                            isAscent = true;
                        else
                            isAscent = false;
                        // translate to table model index and sort
                        int modelColumn = table.convertColumnIndexToModel(tableColumn);
                        sortByColumn(modelColumn, isAscent);
            public Object getValueAt(int row, int col)
                int rowIndex = row;
                if (indexes != null)
                    rowIndex = indexes[row];
                return data[rowIndex][col];
            public void setValueAt(Object value, int row, int col)
                int rowIndex = row;
                if (indexes != null)
                    rowIndex = indexes[row];
                super.setValueAt(value, rowIndex, col);
            public void sortByColumn(int column, boolean isAscent)
                if (sorter == null)
                    sorter = new ATSTableSorter(this);
                sorter.sort(column, isAscent);
                fireTableDataChanged();
            public int[] getIndexes()
                int n = getRowCount();
                if (indexes != null)
                    if (indexes.length == n)
                        return indexes;
                indexes = new int[n];
                for (int i = 0; i < n; i++)
                    indexes[i] = i;
                return indexes;
            public int getRowCount()
                return data.length;
            public String getColumnName(int c)
                return columnNames[c].toString();
            public int getColumnCount()
                return columnNames.length;
            public Class getColumnClass(int col)
                switch (col)
                case 0:
                    return String.class;
                case 1:
                    return String.class;
                case 2:
                    return String.class;
                case 3:
                    return Integer.class;
                case 4:
                    return Integer.class;
                          default:
                    return Object.class;
        class ATSTableSorter
            SortFilterModel model;
            public ATSTableSorter(SortFilterModel model)
                this.model = model;
            public void sort(int column, boolean isAscent)
                int n = model.getRowCount();
                int[] indexes = model.getIndexes();
                for (int i = 0; i < n - 1; i++)
                    int k = i;
                    for (int j = i + 1; j < n; j++)
                        if (isAscent)
                            if (compare(column, j, k) < 0)
                                k = j;
                        else
                            if (compare(column, j, k) > 0)
                                k = j;
                    int tmp = indexes;
    indexes[i] = indexes[k];
    indexes[k] = tmp;
    public int compare(int column, int row1, int row2)
    Object o1 = model.getValueAt(row1, column);
    Object o2 = model.getValueAt(row2, column);
    if (o1 == null && o2 == null)
    return 0;
    else if (o1 == null)
    return -1;
    else if (o2 == null)
    return 1;
    else
    Class type = model.getColumnClass(column);
    if (type.getSuperclass() == Number.class)
    return compare((Number) o1, (Number) o2);
    else if (type == String.class)
    return ((String) o1).compareTo((String) o2);
    else
    return ((String) o1).compareTo((String) o2);
    public int compare(Number o1, Number o2)
    double n1 = o1.doubleValue();
    double n2 = o2.doubleValue();
    if (n1 < n2)
    return -1;
    else if (n1 > n2)
    return 1;
    else
    return 0;
    class TableHeaderRenderer extends JButton implements TableCellRenderer
    public static final int NONE = 0;
    public static final int DOWN = 1;
    public static final int UP = 2;
    int pushedColumn;
    Hashtable state;
    public TableHeaderRenderer()
    pushedColumn = -1;
    state = new Hashtable();
    setMargin(new Insets(0, 0, 0, 0));
    setHorizontalTextPosition(LEFT);
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus,
    int row, int column)
    setText((value == null) ? "" : value.toString());
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    boolean isPressed = (column == pushedColumn);
    getModel().setPressed(isPressed);
    getModel().setArmed(isPressed);
    return this;
    public void setPressedColumn(int col)
    pushedColumn = col;
    public void setSelectedColumn(int col)
    if (col < 0)
    return;
    Integer value = null;
    Object obj = state.get(new Integer(col));
    if (obj == null)
    value = new Integer(DOWN);
    else
    if (((Integer) obj).intValue() == DOWN)
    value = new Integer(UP);
    else
    value = new Integer(DOWN);
    state.clear();
    state.put(new Integer(col), value);
    public int getState(int col)
    int retValue;
    Object obj = state.get(new Integer(col));
    if (obj == null)
    retValue = NONE;
    else
    if (((Integer) obj).intValue() == DOWN)
    retValue = DOWN;
    else
    retValue = UP;
    return retValue;
    private static void createAndShowGUI()
    JFrame frame = new JFrame("TableDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    TableSorter newContentPane = new TableSorter();
    newContentPane.setOpaque(true); // content panes must be opaque
    frame.setContentPane(newContentPane);
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args)
    javax.swing.SwingUtilities.invokeLater(new Runnable()
    public void run()
    createAndShowGUI();

  • How to do a TopN Sort based on a formula

    Hi all,
    My report has two groups, Store and Department.  In the details section are multiple jobs per store with costs. These are subtotalled by Store and Department.  I want to compare total spend for each store with the store budget and produce a list of the Top 10 stores based on the percentage actual spend/budget. 
    My problem is I can only do a Top 10 sort on a summary field and I cannot summarise the percentage field as this is a formula which doesn't seem to allow summaries.
    Any help much appreciated.
    Cheers,
    JD

    Jan,
    Here are a couple of options.
    1) Do the calcuations on the database (thru either a stored proc or command object).
    2) Insert a crosstab where the rows are based on the Store and the summarized field is based on the formula that outputs the percentage of the actual vs budget as a Maximum. You can then do a TopN sort on the crosstab
    Edited by: Graham Cunningham on Oct 10, 2008 8:27 AM

  • Content Items Sorting based on picklist property fails

    Content Server 6.0
    We have developed a custom presentation template to display a list of all the work items. While displaying the work items, I would like to sort them based on a property and then filter them based on another property. I have a template code similar to below:
    <pcs:foreach var="item" expr="filter(sort(sort(index.folder, 'item.pcs_id', true), 'item.application', true), '(filtered.workflow_status != "Completed")')">
    The content item has two properties: application - a picklist, and workflow_status - a picklist.
    The above code template does not return any results. However if I change the expression so that I am sorting by a text property, then it displays the results correctly.
    For e.g,
    <pcs:foreach var="item" expr="filter(sort(sort(index.folder, 'item.pcs_id', true), 'item.name', true), '(filtered.workflow_status != "Completed")')">
    (name is a text property of the content item).
    Is there another way of accesing a picklist property in sort function to retrieve the desired results? Can somebody point out what am I doing wrong?
    Thanks for your help in advance.
    Thanks
    Jignesh.

    Not currently. We're considering this for a future release.
    Regards,
    Jerry
    null

  • Sorting based on non-base table columns

    I have a form block based on X table. There are also some columns from Y table in the same block and the tables X and Y are joined through the appropriate columns. I want to sort the queried record in the block ( based on table X ) based on two columns that are present in the Y table. How do I do this? Any help would be highly appreciated. Ofcourse! we can create a view and achieve that. But I don't want to create a view. Also I can use select statement in the order by column. But it works if I select one column. But when I select two columns it says too many value. Any solutions

    why dont u create a function
    and sort by the returning values ?

  • SSRS - Interactive sorting based on aggregate function

    Hi,
    I'm trying to add interactive sorting to one of the columns in my tablix.
    The soring should be based on the LAST visit date of my child grouping. However interactive sorting is not compatible with aggregate functions apparently.
    I'm using the following expression to sort on the period since the last visit:
    =DateDiff(
    "d"
    ,LAST(CDate(Fields!Visit_date.Value))
    ,Today()
    Anyone an idea how to get this done?
    Regards,
    LiskieWhisky

    Thanks for the input,
    Qiuyun Yu: I already applied your method but my issues is that the visit dates are on de level of my
    child grouping and per child multiple visit dates are possible. Since I want to complute the days since the last visit I need to take the last visit date and subtract it from today's date.
    As you can see there are 2 dates. To compute the days since the last visit I take the last visit date (2015-04-17)
    and subtract it from today (2015-04-27). This gives me 10 days. That's ok, no problem there.
    But because I'm using the Last() function, I cannot use this expression in the Interactive sorting expression.
    LucasF: You are right, but if it's possible to do this in the report I'd prefer that. But ultimately if it's necessary I'll have to do it in MDX then.
    Kind regards,
    LiskieWhisky

  • Sort layers by colour

    Hello
    Each layer has one path item with one colour in it.
    Is it possible to sort the layers by the colour of the path item they have?
    Thank you!
    Best
    Vargas

    Jong… you have a wicked
    S
    O
    H

  • Controlling Sort based on Value of an Item

    Hi all,
    Here's the scoop - I've got an Apex "report query" that uses an "advanced" RTF layout. I'd like to send a page item, say P1_SORT_BY with a value of "name" or "count", and make the template dynamically render the appropriate "<?sort ...?>" tag based on that value.
    I tried using a "choose" tag to specify the sort order, like this:
    <?for-each:ROW?>
    <?choose:?>
    <?when:P1_SORT_BY='name'?>
    <?sort:NAME;'ascending';data-type='text'?>
    <?end when?>
    <?when:P1_SORT_BY='count'?>
    <?sort:COUNT;'ascending';data-type='number'?>
    <?end when?>
    <?end choose?>
    but I can't seem to get it working. I can see that P1_SORT_BY in the template does receive a value. Has anyone done something similar? Any ideas/suggestions?
    Thanks!

    I guess, this will add some more insight to you.
    http://blogs.oracle.com/xmlpublisher/2006/05/26#a41

  • Sorting based on a parameter does not work

    Hi All
    I am using BI Publisher Reports with Siebel CRM 8.1.1.6. I have declared a parameter called "inputsort" in the CRM application as well as in the template by using <?param@begin:inputsort?> within the template. I can display the current value of the parameter using <?$inputsort?> without issues.
    However, when I try using this parameter for sorting, it doesn work:
    The report is created for a list of event attendees. When I do this, sorting works:
    <?for-each:EeventsEventCheckAttendee?><?sort:ContactLastName?>
    BUT when I do this, sorting does not work:
    <?for-each:EeventsEventCheckAttendee?><?sort:$inputsort?>
    although the parameter $inputsort does have a value of "ContactLastName".
    What could be the reason??

    never mind, I found the solution myself. For some reason, the correct way is:
    <?for-each:EeventsEventCheckAttendee?><?sort:./*[name(.) = $inputsort]?>
    I don't know why, but it works.

Maybe you are looking for

  • Infopackage Selections Tab-OLAP Variable/ABAP Routine

    Hi Experts In my Infopackage Selections Tab i had Cal Mon/Year field.... As per my requirment i have to write a selection condion that when we execute info package (it is a monthly data load)  it will extract data only for the months greater than or

  • Sharing Internet with another Mac via Bluetooth

    I'm trying to help my wireless-less iMac G5 get online. It sits about two inches away from a MacBook Pro on my desk, which connects to the household wireless network via the in-built AirPort card. I'm hoping I can share that AirPort connection via Bl

  • Poor signal in areas that should be full coverage

    I have had Verizon for about a year or so now. For the most part the service has been solid, and recently there have been some improvements in coverage on less traveled roads. However, I am running into a problem with getting a consistent 3G signal o

  • Using In operator in Formula Column,URGENT!!!!!!!!!

    Hi... I want to ask if I have a formula Column(REPORTS 6i),and I want in where condition using parameter to some condition as this example: function CF_1Formula return Number is S NUMBER(10); begin SELECT SUM(SAL) INTO S FROM EMP WHERE DEPTNO IN (:DE

  • Safari Home Page On Secure Wifi Network Login

    My employer has a very secure guest network. Sometimes when I log in and connect, my Ipad goes directly to Apple.com. This causes a problem because if I hit the Home key so I can open Safari, my Ipad disconnects from the WiFi network and I get a "not