Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Layout with cfif 1

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
US
<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
 
So you would like the results divided into sections by vComply value? Columnar or tabular?

Compliant
18032432 Schmoe, Joe Acctg
...

Concurrent
88568013 Smith, Mary Mktg
....

or

Compliant Concurrent
18032432 Schmoe, Joe Acctg 88568013 Smith, Mary Mktg
.... ....




Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Not NULL-terminated yet.
 
Phil,

I want tabular:

Compliant Concurrent
18032432 Schmoe, Joe Acctg 88568013 Smith, Mary Mktg
.... ....

thx much
 
So you want the classification in columns?

OK.

Redo your query to order by vComply, then ID or last name or however you want the people listed.

Then,
<table>
<tr>
<cfoutput query="rstDisplay" group="vComply">
<td>
<table>
<tr>
<td colspan="#thenumberofcolumnsinthequery#">
#vComply#
</td>
</tr>
<cfoutput>
<tr>
<td>#TheAssociateID#</td>
<td>#Lname#, #Fname#</td>
<td>#Dept#</td>
bla ....
<td>#HireStatus#</td>
</tr>
</cfoutput>
</table>
</td>
</cfoutput>
</tr>
<table>

HTH,

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Not NULL-terminated yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top