Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

Printing columns

$
0
0

I have not been able to accomplish this with CSSso I thought I would attempt it with CF.  I am trying to print a membership list for a yacht club in 2

columns.  I first loop through the query results like so (lots of conditions to avoid empty lines):

 

<cfloop query = "memberInformation">          <cfif len(#phn_home#) GTE 8 || len(#phn_office#) GTE 8 || len(#phn_cell#) GTE 8 || len(#phn_spouse#) GTE 8>        <cfset hasPhone = true>        <cfelse>        <cfset hasPhone = false>      </cfif>      <cfif len(#name_friendly#) GT 0 AND len(#name_spouse#) GT 0>        <cfset friendlyName = '#name_friendly# & #name_spouse#'>        <cfset hasSpouse = true>        <cfelse>        <cfset friendlyName = '#name_friendly#'>        <cfset hasSpouse = false>      </cfif>      <div class="memberHolder" id=#member_id# mmbrNm='#friendlyName#' numVsts = #numvisits# hsSps=#hasSpouse#>        <table class="memberRosterTable" width="600px" >          <tr>            <td valign="top" align="left">              <p><b>#name_member#</b><br />                #address#<br />                <cfif len(reReplace(#phn_home#, "[[:space:]]", "", "ALL")) GTE 8>                  (h) #phn_home#                 </cfif>                <cfif  len(reReplace(#phn_office#, "[[:space:]]", "", "ALL")) GTE 8>                  (o) #phn_office#                 </cfif>                <cfif  len(reReplace(#phn_cell#, "[[:space:]]", "", "ALL"))GTE 8>                  (c) #phn_cell#                 </cfif>                <cfif  len(reReplace(#phn_spouse#, "[[:space:]]", "", "ALL")) GTE 8>                  (s) #phn_spouse#                </cfif>                <cfif hasPhone>                  <br />                </cfif>                <cfif len(#email#) GTE 8>                  Email: <a class="mailToLink" href="mailto:#email#" target="_top">#email#</a>                   <cfif len(#email_spouse#) GTE 8>                    | <a class="mailToLink" href="mailto:#email_spouse#" target="_top">#email_spouse#</a>                  </cfif>                  <br />                </cfif>                <cfif len(reReplace(#memberSince#, "[[:space:]]", "", "ALL")) GTE 1>                  Member since #memberSince#<br />                </cfif>                <cfif len(reReplace(#boat_name#, "[[:space:]]", "", "ALL")) GTE 1>                  #boat_name#,                </cfif>                <cfif len(reReplace(#boat_mooring#, "[[:space:]]", "", "ALL")) GTE 1>                  #boat_mooring#<br />                </cfif>                <cfif len(reReplace(#boat_length#, "[[:space:]]", "", "ALL")) GTE 1>                  Length: #boat_length#  Beam: #boat_beam#  Draft: #boat_draft#<br />                </cfif>              </p>              <br /> <br /> </td>            <td valign="top"  width="150"><p><b>#friendlyName#</b></p></td>                     </tr>        </table>      </div>  </cfloop>

 

 

This displays a very readable, single-column list.

 

 

At this point I would like to format it into 2 columns so it can be printed, hole-punched and placed in a 5.5x8 3-ring

binder.

 

 

Any thoughts?

 

 

Thank you!

John


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>