Hi, Ben...
I tried creating my own page with the approach you described
as my first attempt at printing labels... couldn't get the things
to line up properly.
I finally went to Word to create the HTML for labels for me
and decided to try to loop the entire page so as to not disrupt
the alignment.
I did get a solution worked up looping the entire 30-label page.
I first setup a variable to control the row count used when the
query loops the page: CFSET StartRow = 1
Then, I use CFOUTPUT Query= Get_Addresses,
Then just make each label like so (minus a lot of code):
#Get_Addresses.First_Name[StartRow]#, etc.
Second address uses:
#Get_Addresses.First_Name[StartRow+1], etc.
Then at the end of the 30-label page, I use:
CFSET StartRow = StartRow + 30
and print labels 31 - 60.
It's working fine so far... however, I'll probably go back at some point
and see if I can get away with the method you described without
breaking the printing alignment.
Thanks for your response!
Rick
-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED]
Sent: Monday, December 11, 2006 9:00 AM
To: CF-Talk
Subject: RE: Printing Mailing Labels Advice Needed
Rick,
Don't wrap the output around 30 addresses. Just have a cfoutput loop
with a single address inside. If you look at the HTML its probably just
some table template. Then, just add the appropriate end row / start row
if needed:
table
tr
cfoutput query=qLabel
td./td
cfif
(NOT (qLabel.CurrentRow MOD 3)) AND
(qLabel.CurrentRow LT qLabel.RecordCount)
/trtr
/cfif
/cfoutput
/tr
/table
This way, your query will make much more sense. In this example, I am
assuming there are 3 labels across (MOD 3).
...
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
Need ColdFusion Help?
www.bennadel.com/ask-ben/
-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED]
Sent: Friday, December 08, 2006 7:44 PM
To: CF-Talk
Subject: Printing Mailing Labels Advice Needed
Hi, gang.
I'm using MS Word to setup the HTML for printing mailing labels, then
inserting a query into the HTML for getting my addresses.
The addresses are 30 per page. I'm using CFOUTPUT Query = to output
the info.
In the HTML, I put the variables, #First_Name#, etc.
Problem:
The CFOUTPUT Query is wrapped around 30 labels at a time and I'm trying
to figure out how to work the query or either the CFOUTPUT to output one
address per label instead of one address on all 30 labels.
I solved this before, but can't remember how I did it and now I can't
find the code.
Would something like using #get_addresses.first_name[1]# solve the
problem?
Other advice?
Thanks,
Rick
PS - Remember CF 4.5 here. :o) (Still making money off that old
software)
~|
Create robust enterprise, web RIAs.
Upgrade integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263529
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4