Highlight every alternate row

Hi,
I have 2 queries, one for master and one for detail linked.
In my paper layout, for my detail group I need to highlight every alternate row.
I tried with creating a summary column in detail group
and assigned formula as 'count' and selected reset group as the detail group, but i don't know what to assign for the source.
also help me how the formatting trigger goes.
thanks
asha

Hi Asha,
There may be several ways to achieve this - "to highlight every alternate row" in your detail group.
Here is just one example that I have tested - based on 2 linked queries (1 master and 1 detail).
In your detail query, add the following column:
mod(rownum,2)"Seq"
to your SQL statement.
This will give you values of 0 or 1 for alternate rows. ie row 1 "seq" will have a value of 1 and row 2 will have a value of 0, etc. This column does not need to be displayed in the layout.
Now, you can add the following format trigger for each of the columns in the detail group:
begin
-- Automatically Generated from Report Builder.
if (:mod_rownum_2 = '0')
then
srw.set_foreground_fill_color('red');
srw.set_fill_pattern('solid');
end if;
return (TRUE);
end;
The above code was generated by using conditional formatting, setting the colour to "red".
Hope the above helps.
Regards,
John

Similar Messages

  • Does anyone knows how to highlight every other row in numbers mac

    Does anyone knows how to highlight every other row in numbers and are there any good tutorials out there???

    Hi Lee,
    Select a non-header cell in the table.
    Open the Inspector and choose the Table Inspector.
    Click to check the 'Alternating Row Color' box in the Cell Background section.
    Click the Color well beside the check box to open the Color pane.
    Choose a colour.
    The alternating colours are applied only to the non-header rows and non-header columns in your table.
    Regards,
    Barry

  • How to make the shade for every other row?

    Hi,
    i want the rows in my report dispalyed as:
    row1: gray
    row2: white
    row3: gray
    row4: white
    row5: gray
    thanx

    Hello,
    Highlight every alternate row
    Highlight every alternate row
    Regards

  • Alternate row different dynamic BGcolor

    I cannot find the way to handle the Dynamic BgColor
    change....
    Because in my calender report got 600 field each fields
    depend on the flag to change the Bgcolor...
    i found the lousy way is each field have to set a duplicate
    color field overlap the data fields(set transparent)...then the
    color field
    set in the property "Print when" qeury.Flg eq 1 then show
    color.....
    is it got anyway like the HTML + CFM to set every alternate
    row set the BgColor...?
    if dun have choose i need to use this lousy way...
    i Need helps...

    utardylan wrote:
    > THX FOR UR replyed Daverms...
    > Actually i also using such way to make it....
    > bcoz i have 600++ query.fields in my report....so it too
    tedious to use this
    > way...
    >
    > So i'm finding the easy way to set it...
    >
    > but anyway thanks for ur reply
    >
    assuming you want to alternate 2 colours of rows returned by
    your query:
    <cfoutput query="yourquery">
    <table>
    <cfif yourquery.currentrow MOD 2 is 1>
    <cfset bgc = "##cccccc">
    <cfelse>
    <cfset bgc = "">
    </cfif>
    <tr style="background-color:#bgc#;">
    <td></td>
    <td>...
    </tr>
    </cfoutput>
    </table>
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com

  • Alternate row highlighting for library and playlist display

    I recently upgraded to iTunes 7 from an old version (4). The old version had a readability feature that appears to be lacking in 7 -- library and playlist contents had alternate rows highlighted subtly. As I have a high screen resolution and use many columns, this highlighting was very useful to me.
    Does anyone know if there is a way to turn this on for iTunes 7?
    Thanks,
    Per
      Windows XP Pro  

    I don't think the source bar ever had the alternate bars, and the library still has it. It does seem to be much more subtle than before, though. Have you tried adjusting the contrast on your monitor?

  • How to show alternate rows in different colors?

    How to show alternate rows in different colors?
    Thanks

    you should put these kind of stmt in the if condition for even row and odd row
    <xsl:attribute xdofo:ctx="block" name="background-color">yellow</xsl:attribute>
    this should help you
    Re: About highlight row
    http://blogs.oracle.com/xmlpublisher/2007/08/09
    http://garethroberts.blogspot.com/2007/09/bi-publisher-color-list-and-cell.html

  • Alternate rows with different number of columns in JTable or similar

    Hi Guys,
    I have tried searching google and these forums, but have not been able to find what I am looking for.
    Looking for ideas, on how to do the following
    I have a swing application, that I would like to have alternate rows
    eg.
    1st row has 10 columns
    2nd row has 1 column, that expands all 10 columns of the 1st row
    and keeps alternating like this for the rest of the records in the table.
    Is there a special JTable that can do this for me, or has anyone had to do this before.
    Thanks,
    Mac

    an example of merging cells is here
    [http://www.crionics.com/products/opensource/faq/swing_ex/JTableExamples4.html]
    scroll down to 'Multi-Span Cell'
    run the program, highlight some cells, click combine.
    if that's the type of thing you're after, modify your code per what's in 'combine'
    note: the original code (now) produces a stack overflow error (don't know if it's been fixed in the above link),
    but if you get that error, in AttributiveCellTableModel's setDataVector( Vector newData, Vector columnNames )
    change
    setColumnIdentifiers(columnNames);
    to
    columnIdentifiers = columnNames;

  • Alternate Row Shading or Formatting

    Hello,
    I have a report in which I want to shade the backgroud color for alternate rows.  More specifically, I'm trying to do this for a group footer (the details are suppressed and the group footer is the most detailed level displayed).  When I do this, not every other line is shaded.  Sometimes it is three in a row, sometimes once, etc.  I'm assuming this is because groups with a $0 value are suppressed.  This is the formula I'm using:  
    if (recordnumber mod 2) > 0 then Color (238,238,238) else crwhite
    Any suggestions would be greatly appreciated.
    Thanks,
    Dan

    Try this
    //Place this formula in the  group header/footer section that you with to be shaded and only in that group
    Whileprintingrecords;
    global numbervar shading;
    shading := shading + 1
    ///place the following formula in the section expert for group footer/header you wish to shade
    Whileprintingrecords;
    global numbervar shading;
    if remainder(shading,2)=1 then Color (238,238,238) else crwhite

  • How to shade alternate rows in deski

    Hi all,
    I am new to business objects. I have a requirement from the client that I need to differentiate the alternate rows by different shadings.
    Can anyone help me out.
    Thanks & Regards,
    BO

    larryc wrote:
    Yes... The value of LineShading is 1.00 for every row...
    Something is strange, then. I use this Code:
    =Mod(LineNumber() , 2)
    all the time, and it should work okay. Not to beat a dead horse, but are you absolutely sure that's the calculation that you are doing?
    If Linenumber() is working, then the Mod() function should be fine. But here's an alternate calculation you can try...
    Code:
    =If (Even(LineNumber())) Then 1 else 0
    That should also give you alternating rows, based on whether the Line Number value is even or not. Perhaps give that a try...
    All the best,
    Praveen

  • Alternate row shading in tables

    Hi all
    I've been trying again and again to get alternate rows of my long table in Frame 11 to be shaded.
    I succeeded, then did something to remove them, and now I CANNOT get them to reapply.
    I am using the Table Designer, Shading tab.
    The Heading and Footing Shading works fine, it changes as I change colour or fill.
    But the Body Shading refuses to.
    Have set Body shading to Shade by Body Rows
    First : 1
    Fill 3%
    Color: Secondary Blue
    Next 1
    Fill: None   
    Colour White
    When I apply, nothing seems to change. I have the whole table highlighted.
    The Custom Ruling and Shading dialog works fine but this is a long table and I don't want to go down that route. Though given the amount of time I've spent on this I probably could have done it twice over...
    Can anyone help please? It feels like a FM bug but it could just be something I'm doing wrong.
    Thanks
    Laura

    To understand what your table tag is doing, create a blank table using that table tag.
    Once you've got the settings of that table squared away, apply to your existing table.
    If you still have problems, then you have custom ruling and shading applied (which I strongly recommend against, along with other format overrides). Use Error's method for removing the overrides, but examine your choices carefully; the custom ruling and shading box is particularly confusing.
    -Matt 
    Matt Sullivan
    roundpeg, Inc. contractor
    @mattrsullivan
    P: 714 798-7596 | F: 360.230.7269 | [email protected]

  • [SOLVED]How would I highlight every other line in ZSH output?

    komrad_toast wrote:
    Hello everyone I have the following function in ZSH (it is part of a larger help file i've created called @help):
    function mykeys #== Lists all dwm keybindings in a nice, formatted manner. Used in @help
    echo ""
    gawk 'BEGIN { printf("\33[1;7;32m%-18s\33[34m%-50s\n\33[0m"," Key"," Binding"," Description") }'
    grep "//#" $HOME/code/dwm/config.h | awk -F "//#" '{print $2}' | column -ts :
    echo ""
    This function greps my dwm config.h for comments related to my keybindings and displays them in an easily readable manner.
    The comments are in the following format for easy finding/parsing:
    //#Mod+i:Increments number of windows in master area
    The output of this function looks like this:
    I was wondering if there was a way to 'highlight' every other line in this with a different background color (preferrably a light shade of grey) for even easier readability. Any help would be appreciated, and thanks in advaced!
    I seem to have  solved my own problem. For anyone interested in the solution, it was just a little awk scripting. I changed the function to the following:
    function mykeys #== Lists all dwm keybindings in a nice, formatted manner. Used in @help
    echo ""
    gawk 'BEGIN { printf("\33[1;7;32m%-18s\33[34m%-50s\n\33[0m"," Key"," Binding"," Description") }'
    _LINES=$(grep "//#" $HOME/code/dwm/config.h | awk -F "//#" '{print $2}' | column -ts :)
    echo $_LINES | gawk '{
    if (FNR % 2 == 0)
    printf("\033[00,40m%s\033[0m\n",$0)
    else
    printf("%s\n",$0)}'
    echo ""
    Explanation:
    The first gawk statement just prints the titles for the different columns in the screenshot, done mainly with escape sequences. Then I'm setting _LINES equal to the formatted comments from my config.h file. _LINES is then piped to the second gawk statement which uses the builtin FNR variable (which is set to the current record number of the file that you are parsing) to figure out if the line number is even or not. If it is, it sets the background color to a lighter grey, prints the entire record, then resets the color and prints a new line. Voila! Pretty nifty what a little gawk can do.
    Now if only i could get the background color to extend to the end of the column...
    edit: duh, simple fix for that to. Just change to %s in the first printf of the if/else statement to %-67s
    Last edited by komrad_toast (2015-01-15 10:30:20)

    Thanks for that!
    After your suggestion i revised the function to this:
    function mykeys #== Lists all dwm keybindings in a nice, formatted manner. Used in @help
    gawk -F'[#:]' '
    BEGIN {
    printf("\n\33[1;7;32m%-21s\33[34m%-52s\n\33[0m"," Key"," Binding"," Description")
    if ((FNR % 2) == 0)
    printf("\033[0;2;40m %-21s%-51s\033[0m\n",$2,$3)
    else
    printf(" %-21s%-50s\n",$2,$3)
    END {
    printf("\n")
    }' $HOME/code/dwm/config.h
    This could actually go in my aliases file now, but i think it's fine as a function. Thanks again
    EDIT: The only caveat now is that if any two of the lines in config.h that have '//#' on them contain lines WITHOUT '#//' on them between them it throws off the highlighting. This is why:
    FNR is an awk built-in that represents the current record number in the current file. I am using it as if every record in the file will contain '//#', obviously not every record will. So if line 100 in my config.h is
    { MODKEY, XK_i, incnmaster, {.i = +1 } }, //#Mod+i:Increments number of windows in master area
    then it will be highlighted, because it matches the pattern ('/\/\/#') and is an even line number. But if line 101 does not contain a comment that matches the pattern, and line 102 does, then you will see two highlighted rows right next to eachother in the final output. I do not know a way around this.
    Last edited by komrad_toast (2015-01-17 09:18:28)

  • Please give me idea how I highlight the gird row which have

    Sir
    I have gird with 5 column
    Vno
    Code
    Dept
    Date
    Amount
    Sir my need is which record have above 5000 amount that color read and other color blue
    It means above 5000 highlight in grid
    Please give me idea how I highlight the gird row which have above 5000 maount
    Thank
    aamir

    PROCEDURE pr_Set_VA (p_VA IN VARCHAR2) IS
    v_Feld VARCHAR2 (30);
    v_Item VARCHAR2 (61);
    v_Block VARCHAR2 (30);
    BEGIN
    v_Block := :SYSTEM.CURSOR_BLOCK;
    v_Feld := Get_Block_Property (v_Block, FIRST_ITEM);
    WHILE (v_Feld IS NOT NULL) LOOP
    v_Item := v_Block || '.' || v_Feld;
    Set_Item_Instance_Property (v_Item, CURRENT_RECORD, VISUAL_ATTRIBUTE, p_VA);
    v_Feld := Get_Item_Property (v_Item, NEXTITEM);
    END LOOP;
    END;

  • How to get all rows in table to red using alternate rows properties option

    How to get all rows in table to red using alternate rows properties option

    Hi Khrisna,
    You can get all rows red by selecting the color red in the "Color" and "frequency" to 1 under the "Alternate Row/Column colors".
    I tried doing it and the colors freaked me out (all red) :-D
    Kindly tell me if im missing something.
    Regards,
    John Vincent

  • Using alternate rows with Spry Data Set

    Can anyone provide more information on how to implement alternate row colors with a Spry Data Set?  What I have done is:
    Create spry data set using HTML page as the data set
    The html page that displays the data set is:  <div spry:region="equipment">
    In the default.css page that is linked, I added the info in note #1 below
    When the page displays, no colors appear. Tried changing the colors and still no luck.  Is there another step to do?
    Note #1:
    within the default.css, the following are declared:
    #equipment odd {
    background-color: #CCC;
    #equipment even {
    background-color: “#F2F2F2;
    Note #2:
    Here is a link to see the actual pages referenced above.
    Any ideas? Getting frustrated!!  Thanks in advance for any advice.

    You are going to kick yourself, but, you haven't assigned any page element the ID #equipment. The region is called that but the table or the DIV does not have an idea and your selector matches nothing...

  • How to highlight the whole row of a particular line item of sale

    How to highlight the whole row of a particular line item of sales order depending on condition?
    Please help its urgent..
    Looking forward your reply.
    Moderator message: please do more research before asking, show what you have done yourself when asking, do not flag posts as "urgent".
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 9, 2011 9:30 AM

    Any ideas on what would cause this NOT to work? I added this row right after the table is created and populated and it is still not highlighted when I enter the form. The snippet of code that does this is:
    MyTableModel modelS = (MyTableModel)dataModel.get("S");
    jTable1 = new JTable(modelS);
    jTable1.setRowSelectionInterval(0,0);MyTableModel is this:
    class MyTableModel extends DefaultTableModel {
      public MyTableModel(Object[] columnNames, int numRows) {
        super(columnNames, numRows);
      public boolean isCellEditable(int row, int column) {
        if (TableKey == 'S') {
          if (column == 6) {
            return false;
        if (TableKey == 'O') {
          if (column == 0 || column == 4 || column == 5) {
            return false;
        if (TableKey == 'P') {
          return false;
      return true;
    }Can anyone help? Thanks.
    Allyson

Maybe you are looking for