Solved

Printing Labels

Posted on 2007-11-23
2
199 Views
Last Modified: 2013-12-24
I have a simple query for address label.  

select fname, lname, addr, city, st, zip
from demo

I want to print three addresses per row so that I can save trees.


Jone Doe                                 Sue Doe                          Jim Doe
1234 ABC Street                     1233 DEF Street              1233 GHI Street
Good City, PA 21043               Fun City, PA 21042          Great City, PA 21041      
 
Harry Doe                                Liz Doe                            Tim Doe
1234 ABC Street                     1233 DEF Street              1233 GHI Street
Good City, PA 21043               Fun City, PA 21042          Great City, PA 21041  

bla.....

How do you format this?

thx      
0
Comment
Question by:ethanjohnsons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 20340674
One way is using MOD and the #queryName.CurrentRow# variable to start a new row every 3 columns.


<table width="600">
<tr><cfoutput query="yourQuery">
	<td>#fName#	#lName#<br>
		#addr#<br>
		#city#, #state# #zip#
	</td>
	<cfif currentRow MOD 3 EQ 0></tr><tr></cfif>
	</cfoutput>
</tr>
</table>

Open in new window

0
 

Author Comment

by:ethanjohnsons
ID: 20341427
it works great!

thx much
0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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