[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printing Labels

Posted on 2007-11-23
2
Medium Priority
?
215 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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 …
What You Need to Know when Searching for a Webhost Provider
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 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