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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outputting Info Selectively

Status
Not open for further replies.

khurram

IS-IT--Management
Jan 10, 2001
95
0
0
CA
I have a situation where I have information being display in one row across columns like this:

<TR>
<CFOUTPUT>
<TD>Employees</TD>
</CFOUTPUT>
</TR>

However, I want the output to on the next row for every three employee names. Any suggestions.
 
Hehe. I remember figuring this one myself not long ago.
The trick is to do a little bit of programming. Make your code something like this.

Hope this helps.

Klotzki

--------------------------------------------

<!--- Set Column Counter --->
<CFSET ColCount = 0>

<TR>
<CFOUTPUT>
<CFSET ColCount = ColCount + 1>
<TD>#Name#</TD>

<CFIF ColCount EQ 3>
<!--- Do this only if there are other records --->
<CFIF qryEmployees[CurrentRow] LT qryEmployees.RecordCount>
</TR>
<TR>

<!--- reset ColCount --->
<CFSET ColCount = 0>
</CFIF>

</CFIF>

</CFOUTPUT>
</TR> Klotzki
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top