Color of Rows

is there a way to have the color of the row on a report be a different color based on a value in a column?
what i would like to do is have the row on a report change based on the status. so if one row the status is open have the row be white but if the status is closed have the row on the report be red.
thanks

Syed,
Most make a copy of Standard, Alternating Row Colors template and then modify the column template base on a PL/SQL Expression.
I have found that you need to wrap your column name in single quotes and refer to the name in uppercase in the Column Template Expression box. Your color coding is then placed below in the Color Template box.
Here's a sample:
Column Template Expression
'#STATUS_TITLE#' = 'Completed' or '#STATUS_TITLE#' = 'Withdrawn'
Color Template
<td bgColor =FFFFFF #ALIGNMENT#><font color="#66FFFF"</FONT> #COLUMN_VALUE#</td>
Jeff

Similar Messages

  • How can i change the color of row?

    hi
    I want change my background color of rows.
    for examole first row ,white and next gray and the other rows.
    thanks.

    Hello,
    May be you also select the rownum and use the following example. For more information, please search 'SRW.ATTR' in report help.
    function F_SALFormatTrigger return boolean is
    begin
    if :rownum = 1 then
    srw.attr.mask := SRW.BORDERWIDTH_ATTR +
    SRW.FBCOLOR_ATTR +
    SRW.BBCOLOR_ATTR +
    SRW.BORDPATT_ATTR +
    SRW.FFCOLOR_ATTR +
    SRW.BFCOLOR_ATTR +
    SRW.FILLPATT_ATTR;
    srw.attr.borderwidth := 1;
    srw.attr.fbcolor := 'red';
    srw.attr.bbcolor := 'blue';
    srw.attr.bordpatt := 'checker';
    srw.attr.ffcolor := 'yellow';
    srw.attr.bfcolor := 'green';
    srw.attr.fillpatt := 'crisscross';
    srw.set_attr (0, srw.attr);
    end if;
    RETURN(TRUE);
    end;
    Regards,
    George
    hi
    I want change my background color of rows.
    for examole first row ,white and next gray and the other rows.
    thanks.

  • How to set background color of row in JTable

    Hi,I want to set different background color to rows in JTable according to some value in the this row.
    eg.
    no name isGood
    1 aaa yes (this row's background color is red)
    2 bbb no (this row's background color is blue)
    3 ccc yes (this row's background color is red)
    4 ddd yes (this row's background color is red)
    5 eee no (this row's background color is blue)
    thanks

    thanks!*_*                                                                                                                                                                                                                                                       

  • How to set background color in row of JTable ?

    i am new in java please tell me about How to set background color in row of JTable ? please example code. Thnak you.

    Here is an example: http://www.javaworld.com/javaworld/javaqa/2001-09/03-qa-0928-jtable.html
    For more info on how to use tables read the swing tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    ICE

  • How to color specific row in a table....

    Hi all,
    I created a table out of an Array[]. The table is successfully filled up by array's elements. Each element is a row.
    I want to be able to color specific row; instead of every row. How do I do that?
    I was looking rendering to color a row or a string; but not successfull.
    Thank you for your time and assistence.

    My favorite way of doing this is to use CSS. You plan on giving the row you want colored an id attribute, then provide a style like this:
    <style type="text/css">
      tr#colorMe td {
        background-color:blue;
    </style>Then, when you want to color the row, you make the HTML output like this:
    <table ...>
      <tr> //normal row
        <td></td><td></td><td></td>
      </tr>
      <tr id="colorMe"> //colored row
        <td></td><td></td><td></td>
      </tr>
      <tr> //normal row
        <td></td><td></td><td></td>
      </tr>
    </table>

  • How to color a row using REUSE_ALV_HIERSEQ_LIST_DISPLAY

    Hi,
    I'm able to color a row using REUSE_ALV_GRID_DISPLAY, I tried the same way to color a row at the item level using 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' but I'm not able to get the row color, please let me know how to acheive this.
    Thanks in Advnce
    Narayan

    you need to do 4 things.
    1. Add a field in your final internal table which ur going to display.
    2.Name the field as----
    > color_line(4)   TYPE  c,
                begin of itab,
                              matnr            type  mara-matnr,
                              ernam          type  mara-ernam,
                           color_line(4)   TYPE  c,
               end of itab.
    3.declare layout ....................> data :  it_layout   TYPE lvc_s_layo.
    4. After filled your fieldcat and before display your ALV
            loop at itab assigning to <itab>.
                          if <itab>-ernam eq 'XYZ'.
                          <itab>-color_line = 'C600'.
           end loop.
    it_layout-info_fname = 'COLOR_LINE'.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    exporting
        IS_LAYOUT                      = it_layout
        IT_FIELDCAT                    = your_fieldcat
      and pass ur  ITAB.

  • Color report rows based on a value in that row

    I would like to Color report rows based on a value in that row.
    For examplle with the "EMP" table:
    I would like job=MANAGER to be red and job=CLERK to be green etc etc
    The other example I found only had the option of one color either the highlight or the default color.
    I am looking for a way to do multiple colors.

    Hi,
    In the row template, you can use #1#, #2#, etc to indicate where a field in the report needs to be output. This does not have to be plain text - ie, you can use it within style tags if you like.
    So, take a query like:
    SELECT EMPNO,
    ENAME,
    DEPTNO,
    DECODE(DEPTNO, 10, 'green', 20, 'red', 30, 'cyan', 'white') BG_COLOUR
    FROM EMPYou get columns 1=empno, 2=ename, 3=deptno and 4=bg_colour. In the row template, you can then do:
    Before Rows setting (sets up the table):
    &lt;table&gt;
    &lt;tr&gt;&lt;td&gt;ID&lt;/td&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Dept&lt;/td&gt;&lt;/tr&gt;After Rows setting (closes the table):
    &lt;/table&gt;Row Template 1 (used for ALL rows):
    &lt;tr style="background-color:#4#;"&gt;&lt;td&gt;#1#&lt;/td&gt;&lt;td&gt;#2#&lt;/td&gt;&lt;td&gt;#3#&lt;/td&gt;&lt;/tr&gt;Then, for every row, the colour that has been calculated using the DECODE function will be used in the style tag to colour the background for the entire row.
    How you determine the colours is up to you. I've used DECODE here, but you could use a field on the DEPT table to hold this and use this in your SQL statement.
    Andy

  • How to alternate color of rows in html cfgrid

    Hi all
    How can I alternate the color of rows in html cfgrid?
    I don't have acess to CFIDE/scripts/ajax/resources/ext/css/ext-all.css which is where according to firebug the css styles are kept
    Thanks

    goodychurro1 wrote:
    How can I alternate the color of rows in html cfgrid?
    Hi goodychurro1,
    The cfgrid attribute you are looking for is "striperows".  Optionally, you can also use the attribute "striperowcolor".  Regarding your question in the other thread about binding href/select to a grid, you can use the following cfscript block to create the 'q' query in the example I posted in that other thread (if you're not on CF10).
    <cfscript>
      q = queryNew("myID,myString", "integer,varchar");
      queryAddRow(q, 3);
      querySetCell(q, "myID", 1, 1);
      querySetCell(q, "myID", 2, 2);
      querySetCell(q, "myID", 3, 3);
      querySetCell(q, "myString", "one", 1);
      querySetCell(q, "myString", "two", 2);
      querySetCell(q, "myString", "three", 3);
    </cfscript>
    <cfform>
      <cfgrid name="myGrid" format="html" width="200" query="q" striperows="yes" striperowcolor="##f9f886">
        <cfgridcolumn name="myID" />
        <cfgridcolumn name="myString" />
      </cfgrid>
    </cfform>
    Reference:
    - cfgrid
    Thanks,
    -Aaron

  • Change different background color in row grid

    Hi,
        i want to change different  background color in row grid..ex.two different colors should continue in all row grid..pls guide me ..
    Regards,
    Senthil.

    Hi Senthil,
    If I understand you correctly, you wish to show a grid with alternating colours down the rows.
    You have a few options:
    1) Apply a stylesheet nd display it as HTML.  But this solution lacks the advantages of the iGrid
    2) Return a field with alternating 1's and 0's in the query and use this field in the Colour-Context mapping
    3) Use JavaScript to loop through each row and set alternating background cell colour for all columns
    Hope this helps.
    Cheers,
    Jai.

  • Coloring each row  Dynamically in WebDynpro using SALV_WD_TABLE component

    Hi All,
      We have a requirement in WebDynpro  ABAP ,to display the ALV  table rows with different colors on the bases of come condition at runtime.
        We have checked but got only for column wise but not row wise.
    Can we archive it for Row wise also?
    Thanks in advance.
    CB

    Hi Saji,
    Please go through this...
    coloring  the rows of alv dnamically
    Color ALV column and rows
    Cell color change in ALV
    Cheers,
    Kris.

  • Ow to change the color of row in Datagrid view

    How to change the color of row in Datagridview. Eg. Am getting a remote server services by get-service.  I want to change the color of services that are not running. Am using the below function to get the services.
    Please help me it would be useful
    function Get-SystemInfo
        $array = New-Object System.Collections.ArrayList
    $Script:SystemInfo = Get-WmiObject win32_service -ComputerName $textbox1Computername.text | select DisplayName,Name,state,status,startmode | Sort-Object state,startmode,DisplayName
    $array.AddRange($SystemInfo)
    $datagridview1.DataSource = $array

    Thanks.
    Can you simply my code for Memory usage to Show Computer name, TotalMem,UsedMem,FreeMem, used Mem %, Free Mem %
    Am using the below code :
    $buttonMemory_Click= {
    if($textbox1Computername.text -ne "")
    $script:Object =@()
    $script:array = New-Object System.Collections.ArrayList      
    $Object =@()
    $SystemInfo = Get-WmiObject -Class Win32_OperatingSystem -computername $textbox1Computername.text | Select-Object csname, TotalVisibleMemorySize, FreePhysicalMemory
    $TotalRAM = $SystemInfo.TotalVisibleMemorySize/1MB
    $FreeRAM = $SystemInfo.FreePhysicalMemory/1MB
    $UsedRAM = $TotalRAM - $FreeRAM
    $RAMPercentFree = ($FreeRAM / $TotalRAM) * 100
    $RAMUsedPercent = (100 * $UsedRAM) / $TotalRAM
    $TotalRAM = [Math]::Round($TotalRAM, 2)
    $FreeRAM = [Math]::Round($FreeRAM, 2)
    $UsedRAM = [Math]::Round($UsedRAM, 2)
    $RAMPercentFree = [Math]::Round($RAMPercentFree, 2)
    $RAMUsedPercent = [Math]::Round($RAMUsedPercent, 2)
    $TotalVirtualMemorySize=[Math]::Round($SystemInfo.TotalVirtualMemorySize/1MB, 3)
    $FreeVirtualMemory=[Math]::Round($SystemInfo.FreeVirtualMemory/1MB, 3)
    $FreeSpaceInPagingFiles=[Math]::Round($SystemInfo.FreeSpaceInPagingFiles/1MB, 3)
    $NP=$SystemInfo.NumberofProcesses
    $NU=$SystemInfo.NumberOfUsers
    $Object += New-Object PSObject -Property @{
    #ComputerName = $textbox1Computername.text
    TotalRAMGB = $TotalRAM;
    FreeRAMGB = $FreeRAM;
    UsedRAMGB = $UsedRAM;
    FreeRAMPercentage =$RAMPercentFree;
    UsedRAMPercentage =$RAMUsedPercent;

  • Dynamic coloring of rows using FM (Reuse_alv_grid_display.)

    I need to color the rows depending on the condition dynamically . I am using FM Reuse_alv_grid_display for ALV . I have the code using Oops Concept, But i need to know how can we do using the Function Module. Please Clarify

    Hi,
    In the final internal table you declare one fieldsline_col(4) type c.
    Data: begin of itab occurs 0, "final internal table.
          line_col(4) type c,.
         end of itab.
    IF .......your condition.
        loop at itab.
          if itab-WERKS = '1000'.
            itab-line_col = 'C600'.
          endif.
          modify itab.
          clear itab.
        endloop.
    Next build your FIELDCATALOG ......
        gt_layout-zebra = 'X'.
        gt_LAYOUT-DETAIL_POPUP = ' '.
        gt_layout-info_fieldname = 'LINE_COL'.
    Next pass this to your FM.
    I hope this will help you.
    Thanks.
    If your issue is solved award points and close the thread if not revert back.
    Message was edited by: Deepak333 k
    Message was edited by: Deepak333 k

  • Different color of row

    Hi experts,
    I need to change the color the last row of my table with a different color. How can I do this?
    TKS a lot in advance

    HI,
    For coloring your rows follow this approach :
    1.Create a context attirbute for CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN to the node to which the table is bound.
    2. Bind this attribute to the CELL_DEISGN property of all the columns.
    3. Get the no of rows in table.
    4. When last row is selected, change the value of cell design attribue.
    Sample Code :
    lt_table - table with all data which is to be binded with table.
    n - type I.
    lv_tabix - type I.
    ls_table - work area .
    describe lt_table lines n.
    loop at lt_table into ls_table .  "This table is bound to node
    lv_tabix = sy-tabix.
    if lv_tabix = n.
    ls_table-cell_design = CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_DARK
    modify lt_table from ls_table index lv_index.
    ENDIF.
    endloop. 
    Bind the table to the node.
    For possible values for the color please check http://help.sap.com/saphelp_nw70/helpdata/en/45/0ef14d9d942462e10000000a1553f7/frameset.htm
    This has been discussed many times :
    Refer this thread :
    Re: Color a table row
    Coloring a row in Table Control
    Edited by: Saurav Mago on Oct 8, 2009 9:16 PM

  • Is it possible to add color context row with javascript?

    Hi,
    Is it possible to add color context rows for a graphic object with javascript?
    Thanks.

    The match syntax changed between version 12.0 and 12.1, so my recommendation to you is to build an iGrid template the way you would like to do it with javascript, then export the display template from the workbench. 
    Open the template in a text editor and observe the format for the MatchValues, MatchColumns, and MatchColors strings.
    Then your javascript will follow the document.APPLET.gridObject().setMatchXXX("xxxx"); as shown in the script assistant.

  • About inserting color to rows in alv

    hi ,
        could any one tell me how to insert colors to rows in alv.
    regards,
    pavan.

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = fieldcatalog[]
          i_save             = 'X'
        TABLES
          t_outtab           = it_ekko
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
    *Populate field with color attributes
      LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
    reward if usefull....

  • Does Coloring Of Rows and Column in Query effect the Performance of Query

    Hi to all,
    Does Coloring of Rows and Column in Query via WAD or Report designer , will effect the performance of query.
    If yes, then how.
    What are the key factor should we consider while design of query in regards of Query performance.
    I shall ne thankful to you for this.
    Regards
    Pavneet Rana

    There will not be any significance perofrmance issue for Colouring the rows or columns...
    But there are various performance parameters which should be looked into while designing a query...
    Hope this PPT helps you.
    http://www.comeritinc.com/UserFiles/file/tips%20tricks%20to%20speed%20%20NW%20BI%20%202009.ppt
    rgds, Ghuru

Maybe you are looking for

  • Best practice for managing unofficial user repo with git?

    G'day Archers, (I hope this is the right subforum for my question -- feel free to move.) I am currently playing around with setting up an unofficial repo. So far so good, except I am trying to make sure I do things "properly". I am currently deployin

  • Exchange 2007 SP3 Search Problems

    I reset all the search indices on my mailbox databases. Event viewer has told me the crawl is complete and everything checks out when I do "test-exchangeSearch" from PS. However, the index folders are considerably smaller than the original ones, (1.3

  • Why am i getting error code 17895 in outlook

    I am trying to get my mail, I have had this email setup for several years and suddenly gives me the message "connection to the server failed or was dropped" Error code 17895.  It will no longer send or receive mail

  • Iphone 5s application icon (yahoo) automatically changes to a different application icon (macys).

    iphone 5s running ios 8.1 application icon (yahoo) automatically changes to a different application icon (macys). When you click the icon, it directs you to Yahoo.  I have had this issue before but the last time the icon was changed to wikipedia.  Th

  • Oracle 11gR2 Installation Error "Invalid Entry Size"

    Hi Gurus, I am getting this error **"invalid entry size (expected 3486269263 but got 19496 bytes) "** during Oracle 11gR2 installation on Solaris 5.10. Here is the config log INFO: Extracting files to '/export/home/perfuser/app/perfuser/product/11.2.