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

Similar Messages

  • Alternate row colours in dynamic tables?

    Hi all,
    I know that alternate row colors are easily accomplished on static tables using class styles. Does any one know if this can be implemented on pages that dynamically display multiple records?

    Yes, it's very easy to do. The actual coding depends on your server-side language. The basic principle is to use the modulo operator (%) with a counter that's incremented with each iteration of the loop.
    Modulo division produces the remainder of a division sum. So, if you use modulo division on the counter, and divide the counter by 2, the result will alternate between 1 and 0, which can be used to determine which class to apply to the current row.
    In PHP:
    <?php $i = 0;
    <?php do {
    <tr <?php if($i++ % 2) {echo 'class="hilite"';} ?>>
    <!-- rest of code -->
    </tr>
    <?php } while ($row_recordsetName = mysql_fetch_array($recordsetName)); ?>
    Create a style rule for all table rows, and a different one for the hilite class. Stripes.

  • Query result Alternate row with different color   

    hello
    can anyone help me on a query result.
    i wish to have a :
    query result Alternate row with different color .
    ex.
    first row light grey
    second row darker grey.
    and repeats itself up to the last record/row.
    thanks

    <tr> <!------------------------------I replaced with
    <tr bgcolor="<cfif currentrow mod
    2>##D3D3D3<cfelse>##F5F5F5</cfif>">
    <td>
    #MYARRAY[x][2].CNO#
    </td>
    <td align="center">
    #MYARRAY[x][2].CDCDTt#
    </td>
    <td>
    #MYARRAY[x][2].PADESC#
    </td>
    <td align="center">
    #MYARRAY[x][2].INc#
    </td>
    <td align="center">
    #MYARRAY[x][2].Exp#
    </td>
    <cfset thirdArray = MYARRAY[x][3]>
    <cfif NOT arraylen(thirdArray)>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <cfelse>
    <cfloop index="z" from="1" to="3">
    <cfif z GT arraylen(thirdArray)>
    <td> </td>
    <td> </td>
    <cfelse>
    <td>
    #thirdArray[z][2]# 
    </td>
    <td>
    #thirdArray[z][3]# 
    </td>
    </cfif>
    </cfloop>
    <cfif arrayLen(thirdArray) gt 3>
    <td nowrap="nowrap">
    <cfloop index="z" from="4" to="#arraylen(thirdArray)#">
    #thirdArray[z][2]# - #thirdArray[z][3]#<BR />
    </cfloop>
    </td>
    </cfif>
    </cfif>
    </tr>
    I got this error.
    Variable CURRENTROW is undefined

  • 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;

  • Scroll bar and alternate row color in Trinidad table

    I am using Jdeveloper 11g
    I have two question on tinidad table see below sample code
    *1)How to set scroll bar on table*
    *2)how to set different colors for alternate rows*
    <tr:form>
    <tr:panelGroupLayout>
    <tr:panelFormLayout inlineStyle="width:965px; height:512px; margin:50px;">
    <f:facet name="footer">
    <tr:table value="#{bindings.UserFavoriteVO.collectionModel}"
    var="row" rows="#{bindings.UserFavoriteVO.rangeSize}"
    binding="#{UserActionBean.table1}"
    emptyText="#{bindings.UserFavoriteVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    rowSelection="multiple" id="table"
    inlineStyle="border-width:none; outline-color:ActiveCaption; outline-style:groove; border-color:Navy; color:MenuText; font-size:medium;"
    horizontalGridVisible="true" verticalGridVisible="false">
    Thanks for all help
    Jaydeep

    Hi Sireesha,
    Thanks for reply.
    I forgot to mentioned that i already tried that option *(rowBandingInterval)*
    <tr:table value="#{bindings.UserFavoriteVO.collectionModel}"
    var="row" rows="#{bindings.UserFavoriteVO.rangeSize}"
    binding="#{UserActionBean.table1}"
    emptyText="#{bindings.UserFavoriteVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    rowSelection="multiple" id="table"
    inlineStyle="border-width:none; outline-color:ActiveCaption; outline-style:groove; border-color:Navy; color:MenuText; font-size:medium;"
    horizontalGridVisible="true" verticalGridVisible="false"
    rowBandingInterval="1">
    but no any success.
    *@ scroll* I found in Frank post it is related to ADF table .So i just want to ask will it be applicable to Trinidad table too.

  • 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

  • Setting alternate row color of DataGridColumn

    Is there a way to set alternate row color of a
    DataGridColumn? I need to set different alternating row color to
    different DataGridColumn.

    Please Check this example
    http://www.flex4ex.com/?p=9

  • GROUP attribute ruins alternate row coloring

    I had the alternate row colors working, but then when I added
    the "GROUP" attribute to my
    <cfoutput> tag, it's not working any more. More like
    random row coloring!
    Any thoughts?
    Thanks!
    Rick
    <table width="100%" border="1" cellspacing="0"
    cellpadding="0">
    <cfoutput query="q_reqmnts_f3" group="req_Cat">
    <tr bgcolor="###iif(currentrow MOD
    2,DE('c5c7c9'),DE('9dc7fc'))#">
    <td height="12"><font
    size="3"><strong>#req_Cat#</strong><br></font>
    <font size="3"><cfoutput>
    <li>     <strong>#req#</strong>   #Spec1#  #Spec2#  <a
    href="
    http://#Link#">#Link#</a> <br
    style="empty-cells:hide"></li></cfoutput><br>
    </td>
    </tr>
    </cfoutput>
    </table>

    when you use the GROUP attribute of CFOUTPUT, your data is no
    longer being output in the same order in which it was retrieved.
    the CURRENTROW variable is no longer in chronological order (you're
    displaying the first grouped element, then 1-n members of that
    group, then repeating).
    you'd need to set an iterating variable.
    <cfset myRowCountVar = 0 />
    <cfoutput query="q_remnts_f3" group="req_Cat">
    <cfset myRowCountVar = myRowCountVar + 1 />
    (now use 'myRowCountVar' to key off of to determine the
    background color rather than currentrow)

  • Webi Alternate Row Colour

    Hi experts,
    I have a webi report which colour lines must have alternate colours. I customized that on the table proporties, in webi, but it's not working... is there some kind of trick to activate alternate row colours?
    Thanks you.
    Cheers!
    Inê

    If you change "Alternate Row/Column colors"property of block then it should applied for that particular block only.
    If you want other colors for other blocks then do the same steps.
    Frequency is by default 2. Which tells us the applied color should show alternatively, and 3,4, etc..., follows like that.
    FYI if you change property of a block and insert new objects then you can't see colors again for the same block.
    Manually you need to do it again to appear.
    Eg:
    if i individually insert say 5 rows to block and drag unique report variables to each row, the alternative colours are not coming up.
    How to acieve this?
    This is the problem, the alternate row fucntion works for a row which have more than one value. In your case you have different variables for each row then you have to do it manually. Remember that if you have more than one value for any variable the second row of that variable will be 255,255,255. By default first row gets the alternate color. You get the same alternate color for all 5 rows because it's first row of all the 5 variables.
    One trick is give alternate color as 239,239,239 for first row and 255,255,255 for second and so on.
    Hope you got me.
    Gracias...!!

  • 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...

  • Finding minimum value in each row using dynamic query

    need to find the minimum and maximum value from each row using dynamic query
    [from curr] will be given as input
    Tuky

    DECLARE @t TABLE(a INT,b INT,c INT);
    INSERT @t VALUES(1,2,3),(9,8,7),(4,6,5);
    SELECT *
    ,      (   SELECT  MAX(val) 
               FROM    (VALUES (a)
                           ,   (b)
                           ,   (c)
                       ) AS value(val)
           ) AS MaxVal 
    ,      (   SELECT  MIN(val) 
               FROM    (VALUES (a)
                           ,   (b)
                           ,   (c)
                       ) AS value(val)
           ) AS MinVal 
    FROM @t;
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Report rows differing widths

    Hi,
    I have a report which contains 4 tablix one above the other all with exactly the same left, padding and width. In Bids preview all the rows display equal width and they also do if i export as PDF. However in report viewer all the tablix are different widths,
    some even have the header in one width and the details rows different.
    I believe the rows are being stretched as one of the cells has an image in which is stretched in report viewer and looks fine exported to pdf or viewed in bids.
    Does anyone know what the issue is?
    Regards
    Chris

    Hi Chris,
    According to your description, you can render your report properly in BIDS and PDF file. However, when it displayed in report viewer, the tablix are in different size. Right?
    In this scenario, it seems the issue of the page size in report viewer. It seems the page size in report viewer is too small, so when displayed in report viewer, the image still keeps the same size as you preview in BIDS, and the other part need to
    resize so that it can fit the report viewer. Please try to adjust the page size. See link below:
    http://msdn.microsoft.com/en-us/library/ms251701(VS.80).aspx
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • 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

Maybe you are looking for

  • Error while viewing Scripts using dbms_metadata.get_ddl

    select dbms_metadata.get_ddl('TABLE',table_name,'DWHOWN') from user_tables DBMS_METADATA.GET_DDL('TABLE',TABLE_NAME,'DWHOWN') CREATE TABLE "DWHOWN"."T_DWBN_RELATION_MASTER" ( "BUSINESS_DATE" DATE NOT CREATE TABLE "DWHOWN"."TMP_CS_CUST_UD_CODES" ( "BU

  • I-Trigue 3400 Price?

    Hello, Im here to enquire about the actual price of the I-Trigue 3400 as I am interested in purchasing them, the website states ?70 but them you have the 3400 series + Free MP3 Player for only 60, anyone else see the problem?

  • Urgent ....Report Style

    Hi I am using Report6i I want to print one field ( in Verical position ) is it possible... o/p i want like this           empno     ename Adress     no:12,mil     2202     devi The addres should print in veritical(90)degree.... Thanks in advance...

  • Execute Calculation for ASO

    Hi, I am trying to convert BSO calc script to ASO calc script using "Execute Calculation" function in maxl. But getting some errors. here is one of the example of calc script. FIX (Actual, "Curr Assig", "Any Product") Sales=0; ENDFIX execute calculat

  • PowerBook Can't Run Airport Management Utility

    I'm still trying to find out why my PowerBook can't run Airport Management Utility, even though all of my other Airport software is up to date. When I try to launch the utility, it gives the message that it "requires Airport 3.4 or later", which I do