Solved

Layout with cfif

Posted on 2007-03-24
1
170 Views
Last Modified: 2013-12-24
 <cfoutput query="RstDisplay">
    <tr bgcolor="CCCCFF">
      <td>#TheAssociateID#</td>
      <td>#Lname#, #Fname#</td>
      <td>#Dept#</td>

       bla ....

        <td>#HireStatus#</td>
      <td>
        <cfif #vComply# eq "Compliant">
        <font color="0000FF">#vComply#</font>&nbsp;#Results#
        <cfelseif #vComply# eq "Concurrent">
            <font color="990000">#vComply#</font>&nbsp;#Results#
            <cfelse>
        <font color="FF0000">#vComply#</font> &nbsp;#Results#
        </cfif>

  </cfoutput>

This output gives the "basic" layout where all rows are under the columns specified.
What I like to have is to divide the layout into three sub-categories based on the #vComply# with cfif, and display like below:

Compliant                                                    Concurrent                                             Non-Compliant

      <td>#TheAssociateID#</td>            <td>#TheAssociateID#</td>                <td>#TheAssociateID#</td>
      <td>#Lname#, #Fname#</td>            <td>#Lname#, #Fname#</td>            <td>#Lname#, #Fname#</td>
      <td>#Dept#</td>                          <td>#Dept#</td>                               <td>#Dept#</td>

       bla ....                                                    bla ....                                                    bla ....

  <td>#HireStatus#</td>                    <td>#HireStatus#</td>                     <td>#HireStatus#</td>

Any ideas, please.

thx much

0
Comment
Question by:ethanjohnsons
1 Comment
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
Comment Utility

Have an outer table that shows the vDisplya types
 and then inner table that displays the details of the record ..

<table>
 <tr>
   <cfloop query="RstDisplay>
   <td>#vDisplay#</td>
   </cfloop>
 </tr>
 <tr>
   <cfloop query="RstDisplay>
    <td>
     <table>
       <tr><td>#theAssociateID</td></tr>
       <tr><td>#Lname</td></tr>
       <tr><td>#Dept</td></tr>
       <tr><td>#HireStatus</td></tr>
     </table>
   </td>
   </cfloop>
  </tr>
</table>
       
     
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now