Solved

Printing Labels

Posted on 2007-11-23
2
159 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

13 Experts available now in Live!

Get 1:1 Help Now