Query results:every other record/row grey and white

Hello guys,
query results:every other record/row grey and white
how would you make every other record/rows a different color
just like the forums color. Lightest grey and white?
<cfquery name="Myqueryname"
datasource="#Request.MainDSN#">
SELECT
CompanyID,
CompanyName,
Address,
City,
State,
ZipCode,
Comments
FROM
Company
ORDER BY
CompanyName ASC
</cfquery>
<html>
<head>
<title>CF TUTORIALS</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>All CO Listings</h1>
<table>
<tr>
<td><b>ID</b></td>
<td><b>Name</b></td>
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>ZIP Code</b></td>
<td> </td>
</tr>
<cfoutput query="Myqueryname">
<tr>
<td>#CompanyID#</td>
<td>#CompanyName#</td>
<td>#Address#</td>
<td>#City#</td>
<td>#State#</td>
<td>#ZipCode#</td>
<td>
<a href=" ALL Emps.cfm?CompanyID=#CompanyID#">ALL
Emps</a>
<a href=" AddCO Form.cfm">AddCO</a>
<a href="
Editco.cfm?CompanyID=#CompanyID#">Editco</a>
<a
href="CoDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
</td>
</tr>
</cfoutput>
</table>
</body>
</html>

There is a cool tool in Coldfusion called MOD
This basically calculates the remainder of the row number
when divided.
I interpreted its use to something like this, which has
worked for me.
<cfoutput query="qry_requestedlist" maxrows="30"
startrow="1">
<cfset EvenRow=#CurrentRow# +1>
<cfif CurrentRow Mod 2 IS 1>
<tr>
<th class="grey" CurrentRow#</th>
<cfelse>
<th class="white">#CurrentRow#</th>
<tr>
</cfif>
</cfoutput>
I doubt this is precisely what you want but this is the sort
of thing.

Similar Messages

  • I need to print one query result as a single row

    Hi,
    I need to print one query result as a single row ,which gives more than one value (of subinventories)and also i would like to print the quantity of that particular subinventory at particular place.Please suggest how can i do this in the report builder?

    Actually I need to print inventory report with subinventory break up.For that all subinventories of category code AB are taken as single row.Based on that subinventory value Quantity must be printed at that particular place.
    For ex
    Quantity
    Item no Description Subinventory Code AB_Abc AB_Def AB_ghi
    1 ***** 12 9
    2 ****** 8 5
    like that.I am waiting for the reply.Plz its some how urgent.
    Thank you,

  • On the top left of my computer screen there are what look like the bottom half of small grey and white squares stacked on top of each other. They form a line about three inches long and I cant seem to get rid of them.  Is my computer dying or being hacked

    On the top left of my computer screen there are what look like the bottom half of small grey and white squares stacked on top of each other. They form a line about three inches horizontally along the top and they cover half of the regualr bar (so half of the apple sign int he corner is covered) and I cant seem to get rid of them.  Is my hardrive crashing or being hacked?

    I have never seen DEVELOP on the menu bar for Safari, hence my query regarding testing. 
    What OS are you using and what version of Safari?
    If you want to check your HDD, Open Disk Utilities>First Aid and run Verify and Repair.
    The only remedy that I can think of that may work is an OS reinstall.
    I seriously doubt that your MBP is being hacked.
    Ciao.

  • My AppleTV will not play anything over Air Play.  Every other function works perfectly, and my Internet/router are working at top speed.  I can watch HD Netflix and YouTube but nothing via my iTunes library on my MacBook or iPad.  All software is updated.

    Every other function works perfectly, and my Internet/router are working at top speed.  I can watch HD Netflix and YouTube but nothing via my iTunes library on my MacBook or iPad.  All software is updated.  The AppleTV will recognize that Air Play is trying to do it's thing, but with music files it sounds like they're skipping and video files just load endlessly. 

    I'm searching for an answer to almost the same exact problem, using almost the same exact hardware and software. Has an answer been found?
    The files that I'm trying to burn come from eMusic, and they are formatted mp3. Recently, (after the iTunes update to 9.2.3?,) they would not drag and drop from iTunes into Toast. From several different discussions I've tried working around this by dragging to the desktop first then dragging and dropping to Toast, going to Toast from a programmer's homemade help window, " iToons," and today, after talking with Apple support, going directly to Toast from my eMusic folder. Alas, all recordings do not perform like they use to. Sometimes they play and sometimes not. There is one I managed, that is listenable, but sometimes I have to put it in my car stereo over and over again as it gets ejected with an error code, sometimes, finally it takes it... Some of the recordings on other disks I've burned are not clean - they have white-noise sounds creeping in... I use to have none of these problems. One time as I was listening to a CD that managed to play, and it just stopped playing... Is there an answer out there to get back to how it use to be? Thanks for you help.

  • WHen I put music onto my devices I will have some songs that will play, while others will be grey and can not be played....also I find that when I purchase an album from iTunes all songs from the album will not be downloaded...

    WHen I put music onto my devices I will have some songs that will play, while others will be grey and can not be played....also I find that when I purchase an album from iTunes all songs from the album will not be downloaded...

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                       
    If necessary
    You can redownload most iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Removing grey-and-white grid background?

    Hey ,
    I installed Acrobat 9 Pro, version 9.4.1, one week ago. Since then, in every opened pdf-document appers an grey-and-white-grid-background (see figure below).  Normally, I would expect a white background, which I get under this setting only, if I change the background manually to white. How can I change this setting, to get the normally white background as a default? Support is warmly welcome - training_needed

    Thank you very much - this makes reading much easier! - training-needed

  • Background of grey and white boxes

    Whenever I open a pdf file with Adobe Reader XI, the file opens with a background of little grey and white boxes.  These boxes make it very difficult to read the content. My question is "how can I eliminate this?" or "how do I open a PDF file with a pure white background?"
    I have tried everything.
    Thank you
    Jerry

    Hi Beth
    How big are  these fields? Are they for entering text or just check boxes?
    I have found that sometimes FormWizard is not compatible with some Quark files.
    Sounds like it might be easier for you to do the fields manually.
    First draw the field like you want it and set that as the default then you can choose to paste multiple fields.
    Also if you want to use a line for FormWizard you can make the background of the field white and cover the line with it.
    Ron

  • When I turned on my ipad the screen is scrolling grey and white veritcal lines. I can't power it off. How can I fix this?

    When I turned on my ipad the screen is scrolling grey and white veritcal lines. I turned on the ipad and plugged it up, when I touched the button on the bottom, it flashed as if the screen was coming up, but instead it scrolled grey and white lines, halfway across the screen and has been doing so for about an hour now. How can I fix this? I need it for school. Am I going to have to send it back? And if so, will they send me a replacement while I am waiting for mines to be fixed?

    Janellie_love-
    You might connect the iPad to its wall charger for half an hour, to be sure there is enough juice to get started.
    That sounds like an internal problem, as you suspect.  If you can show it to an Apple Store Genius, you may get a replacement on the spot.
    If there is no Apple Store near you, look for an Apple Authorized Repair Center.  There may be one in your city.  I do not know how long it would take, or if a "loaner" would be available.  Whether they can fix it on site would depend on what the problem is.  <Apple Authorized Repair Centers>
    One thing you can try is to reset (reboot) the iPad.  Hold both the Home and Sleep buttons for several seconds until the Apple logo appears.  Ignore the "Slide to power off" arrow.  If it works, the iPad will restart after a couple of minutes.  Resetting this way will not hurt anything, and sometimes clears up mysterious problems.
    Fred

  • Grey and white square where the photo should be

    When I open a photo all I that comes up is a grey and white blocked square, if I switch it off of RGB color I can then see the photo, but then I cant save it as a JPEG... what the heck is going on?

    In the Device Manager, which can be found in your Control Panel, you'll be able to find out which graphics card you have. Chances are, it's made by Nvidia or ATI/AMD.
    Once you have that information, go directly to the manufacturer's website (nVidia or ATI/AMD) and download the latest driver. (Note: Simply doing a Windows Update is does not guarantee you are using the latest driver. You must go directly to the nVideo or ATI/AMD websites to get the absolute latest driver.) After you update your driver, turn on Use Graphics Processor in Photoshop preferences. (via http://forums.adobe.com/message/4294508#4294508)

  • Grey and White

    Why do they only have grey and white in outlook 2013?  That sucks so bad.  Outlook 2007 was way better on the eyes.  

    Hi,
    I understand there are only three themes in Office 2013 which is not so satisfactory to some users. I've collected the suggestion and please be assured that any improvements in the product are based on users' requirements. Our developers strive to capture
    Microsoft users' ideas and are working hard to create a more powerful and easy-to-use product.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • Grey and white tripes on display

    After the last upgrade (coincidence or not) after booting the display only shows grey and white irregular horizontal stripes (thin). As I start opening windows and where these open the stripes disappear until all the screen is normal. What on earth is happening. Never seen this on any type of computer PC or Mac.
    Is this a problem with the graphics card. The Imac is not even one year old and very light usage.
    Can anyone help
    Thanks

    I just went over an looked at a friend's 24" iMac which had this same issue after installing the 10.5.5 and latest QuickTime updates. AppleCare had no suggestions. I tried resetting the NVRAM and PRAM. The iMac started up correctly twice and the third time the screen display problem occurred again. Opening up the displays pref pane and changing the colors from millions to thousands eliminated the glitch and I immediately reset the color depth to millions. As long as the computer is running there is no problem. It only occurred at startup or right before shutdown and even then sporadically. I'm convinced it is a software glitch but beyond a belief I have no data on which to base that assertion.

  • Html query report /every other row grey

    Hello
    i have this query to html report
    do you know how to make every other row grey in the out pu of
    the query.
    and where do i put it in this code below?
    thanks in advance
    <cfquery name="GetCompanies"
    datasource="#Request.MainDSN#">
    SELECT
    CompanyID,
    CompanyName,
    Address,
    City,
    State,
    ZipCode,
    Comments
    FROM
    Company
    ORDER BY
    CompanyName ASC
    </cfquery>
    <html>
    <head>
    <title>ColdFusion MX Bible</title>
    <link rel="stylesheet" href="styles.css">
    </head>
    <body>
    <h1>Company List</h1>
    <TABLE width=100% align="left" border="4" rules="all">
    <tr>
    <td><b>ID</b></td>
    <td><b>Name</b></td>
    <td><b>Address</b></td>
    <td><b>City</b></td>
    <td><b>State</b></td>
    <td><b>ZIP Code</b></td>
    <td> </td>
    </tr>
    <cfoutput query="GetCompanies">
    <tr>
    <td>#CompanyID#</td>
    <td>#CompanyName#</td>
    <td>#Address#</td>
    <td>#City#</td>
    <td>#State#</td>
    <td>#ZipCode#</td>
    <td>
    <a
    href="EmployeeList.cfm?CompanyID=#CompanyID#">Employees</a>
    <a href="CompanyAddForm.cfm">Add</a>
    <a
    href="CompanyEditForm.cfm?CompanyID=#CompanyID#">Edit</a>
    <a
    href="CompanyDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
    </td>
    </tr>
    </cfoutput>
    </TABLE>
    </body>
    </html>

    The fastest, but crudest and ugliest.
    <cfoutput query="GetCompanies">
    <tr #IIF(GetCompanies.CurrentRow MOD
    2,DE(''),DE('backgroundColor="##999"'))#>
    kellyhondalovesmusic wrote:
    > Hello
    > i have this query to html report
    > do you know how to make every other row grey in the out
    pu of the query.
    > ??
    >
    >
    > and where do i put it in this code below?
    >
    >
    >
    > thanks in advance
    >
    >
    >
    > <cfquery name="GetCompanies"
    > datasource="#Request.MainDSN#">
    > SELECT
    > CompanyID,
    > CompanyName,
    > Address,
    > City,
    > State,
    > ZipCode,
    > Comments
    > FROM
    > Company
    > ORDER BY
    > CompanyName ASC
    > </cfquery>
    >
    > <html>
    > <head>
    > <title>ColdFusion MX Bible</title>
    > <link rel="stylesheet" href="styles.css">
    > </head>
    >
    > <body>
    >
    > <h1>Company List</h1>
    >
    > <TABLE width=100% align="left" border="4"
    rules="all">
    > <tr>
    >
    > <td>
    ID</td>
    > <td>
    Name</td>
    > <td>
    Address</td>
    > <td>
    City</td>
    > <td>
    State</td>
    > <td>
    ZIP Code</td>
    > <td> </td>
    > </tr>
    > <cfoutput query="GetCompanies">
    > <tr>
    >
    > <td>#CompanyID#</td>
    > <td>#CompanyName#</td>
    > <td>#Address#</td>
    > <td>#City#</td>
    > <td>#State#</td>
    > <td>#ZipCode#</td>
    > <td>
    > <a
    href="EmployeeList.cfm?CompanyID=#CompanyID#">Employees</a>
    > <a href="CompanyAddForm.cfm">Add</a>
    > <a
    href="CompanyEditForm.cfm?CompanyID=#CompanyID#">Edit</a>
    > <a
    href="CompanyDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
    > </td>
    > </tr>
    > </cfoutput>
    > </TABLE>
    >
    > </body>
    > </html>
    >
    >

  • Select query for every 1000 records

    Hi all ,
             Please help me in the issue . I am using select query Select * from table up to 1000 rows for acheving the records but i want this process to retrigger once the process of 1000 records is compleded again it needs to fetch the next 1000 records and process the same . I am changing the status of the processed records once it is processed . Can can one tell me how to retrigger the select query once the 1000 records are processes.
    Thanks in advance,

    Hi Eric,
                  After selecting the 1000 records, find the key value of the last record. Build up the range as GT. Again use the select query.
    For example,
    Select * into table lt_data from ztab
    where key in r_key
    up to 1000 rows.
    regards,
    Niyaz

  • Query results more than 200 rows.

    Hi all:
    I have a problem with a query that results more than 200 rows.
    Only show in a table 201 rows and warning about this message: "Query has exceeded 200 rows. Potentially more rows exist, please restrict your query."
    Is possible that the query show all results ???
    thanks!

    Its still a warning. You can continue with work but definitely you can increase the value through the profile value. Anything within 500 wouldn't cause much performance issue.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                   

  • Lines between every other record in show report

    I've noticed that when I display the results of an Application-Report in Portal with Internet Explorer there is always a faint gray line between the second and third record, the forth and fith record, etc... When viewed with Netscape 6.1 this same report looks as I designed it, with a plain white background behind all of the records. Is there a workaround for this?

    Here are a couple of formulas that should help you out.
    This will calc the time diff between sequential start and end times
    WhilePrintingRecords;
    Global DateTimeVar x := IF {TableName.Type} = "start" THEN {TableName.TimeStamp} ELSE x;
    Local DateTimeVar y := {TableName.TimeStamp};
    Local NumberVar z:= IF {TableName.Type} = "start" THEN 0 ELSE DateDiff("n", x, y);
    And this one will provide a manual running total
    WhilePrintingRecords;
    Global DateTimeVar x := IF {TableName.Type} = "start" THEN {TableName.TimeStamp} ELSE x;
    Local DateTimeVar y := {TableName.TimeStamp};
    Global NumberVar z:= z + IF {TableName.Type} = "start" THEN 0 ELSE DateDiff("n", x, y);
    Note that you'll want to sort  the records by the "TimeStamp"
    HTH,
    Jason

Maybe you are looking for

  • Investment mgt:Error while distributing budgets using IM52 transaction code

    I am getting an error message"Availability control can not be activated for hierarchial projects" when I distribute budgets using IM52  transaction code in Investment management. Can you please tell me why and how to solve it? Edited by: aravind  red

  • Not connecting to docking station

    I have a Bush tv with ipod docking station that is meant to be compatible with my ipod 5th but when docking, the ipod screen is saying connected and the battery is charging but the tv is saying connecting. I can't get the ipod to connect and play i h

  • Query on DNS setup for Active Directory for a new data center

    I have third party DNS appliances providing DNS Service for Active Directory (Windows 2008 R2) and there are also secondary DNS servers, which are MS DNS server with a secondary zone configured, for redundancy. I have to setup a new data center and m

  • T450 - Power Manager crashes after Sysprep

    After Sysprepping a T450 with a clean Windows 7 64 bit Professional custom build, Lenovo Power Manager crashes with "An error occurred while loading resource DLL".   Followed by "There was a problem starting C:\Program Files (x86)\ThinkPad\Utilities\

  • Program on client and server proxy

    hai can any body send me abap programs  or how to run client or server proxy in application system