Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Use Report To Address Envelope (Read 5887 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Use Report To Address Envelope
Feb 3rd, 2005 at 2:40am
Print Post Print Post  
I have not had any opportunity, yet, to play with "reports."  Looking at the instructions to do a simple free form report seems very complicated to me ... and I need it in a hurry - if I am to be able to use the database at all.  

I simply want to create a report that can be used to address an envelope.  What I want is:

Spencer Wulwick (MVR)
210 South Hale Avenue
Tampa, FL  33609-3933




                                                            Mail Name
                                                            Street Address Apt
                                                            City, State, Zip




The return address would be "static" text for all envelopes (reports) printed.

The address section (properly positioned for an envelope, of course) would come from the selected records (I would like to know if I could just select the "open" record) and the words I've shown are the element labels.

It would need to be printed on a standard #10 envelope.

Any quick solutions?
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Use Report To Address Envelope
Reply #1 - Feb 3rd, 2005 at 2:30pm
Print Post Print Post  
Hello Spencer

To get the precision you are asking for it would be best to take a look at PrintString on pages 184-188 Of the Programming Manual. The code would look very similar to the following. One way to run it would be to attach the code to a command button. Another way to run the code is to use a Mass Update, which makes it easy if you have to do more than one or two envelopes. Note: The numbers I used for positioning are a rough guess.

Code
Select All
Newpage(950,412)
PrintString("Spencer Wulwick (MVR)", 30, 25, 0, "Arial", 14, 0)
PrintString("210 South Hale Avenue", 30, @PageExtentY(), 0, "Arial", 14, 0)
PrintString("Tampa, FL 33609-3933", 30, @PageExtentY(), 0, "Arial", 14, 0)

PrintString(Mail Name, 375, 175, 0, "Arial", 14, 0)
PrintString(Street Address + " " + Apt, 375, @PageExtentY(), 0, "Arial", 14, 0)
PrintString(City + ", " + State + ", " + Zip, 375, @PageExtentY(), 0, "Arial", 14, 0)

FinishPage()
 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Use Report To Address Envelope
Reply #2 - Feb 3rd, 2005 at 5:29pm
Print Post Print Post  
Hi Ray -

Thanks, once again, for the "quick & dirty" solution I am looking for.   You were pretty close on the settings; however, I modified them to suit my preferences (and Postal guidelines) and the allignment is perfect.

I do, however, have several questions:

1)  Just out of curiousity, do you think that I MIGHT be able to accomplish the same thing with a free-form report (after I'm more comfortable with report setups)?

2)  Is there any way to send "PRINTER" instructions within the command?  (I checked the reference you gave me and couldn't find anything).  In my particular situation, I have two printers attached to the computer.  Additionally, the one I want to use for envelopes, has manual feed, a letter tray, dual-sided printing, an envelope feeder, etc.  My "quick" solution was to make the envelope feeder my default printer; however, this is NOT what I want for most of my printing.  Put another way, I am asking:  can I include in the printspec info, the specific printer, and options within that printer that I want to use?

3)  I'm confused about your suggesting the use of Mass Update for multiple envelopes.  I would, indeed, need to print hundreds of envelopes (on one click) if for example subscription status was "paid."  From what I recall mass update is used to change information in records.  Can it be used to execute programming such as "If Status = "paid" then printspec .... ?  I'm not looking for detailed information at this point ... I just want to understand the concept.

Thanks

     - Spencer
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Use Report To Address Envelope
Reply #3 - Feb 3rd, 2005 at 5:40pm
Print Post Print Post  
Hello Spencer,

1) I see no reason why a free form report could not do the same thing. I just prefer the precision and accuracy that PrintString has to offer.

2) You will want to look at the AlternateDefaultPrinter Command and the RestoreDefaultPrinter command on pages 61 and 62 of the 1.1 documentation supplement.

3) Mass Update can also be used to gather information. Your code would be exactly as you describe. Just be sure that all of the PrintString Code is within the curly braces for the If Statement. ex
Code
Select All
If Status = "Paid" Then
{
    //all the PrintCode goes in here
} 


-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Use Report To Address Envelope
Reply #4 - Feb 3rd, 2005 at 6:03pm
Print Post Print Post  
Quote:
3)  I'm confused about your suggesting the use of Mass Update for multiple envelopes.  I would, indeed, need to print hundreds of envelopes (on one click) if for example subscription status was "paid."  From what I recall mass update is used to change information in records.  Can it be used to execute programming such as "If Status = "paid" then printspec .... ?  I'm not looking for detailed information at this point ... I just want to understand the concept.


Spencer,

Mass Update is so named for Q&A compatibility but, in actuality, Sesame's Mass Update is a powerful and flexible batch processor that can do all sorts of things. You don't have to update values. You can use Mass Update to cycle through each record in a batch to write a customized export file, send emails, print envelopes, etc.

Mass Update is the real workhorse of Sesame. 
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Use Report To Address Envelope
Reply #5 - Feb 10th, 2005 at 8:17pm
Print Post Print Post  
Ray et al -

I have been working on this one issue - on and off - for more than a week now and it is driving me crazy.  (What do you mean, "It must have been a short trip.")  lol  Let me give you more detail to see if we can arrive at a solution.  (I'll also be repeating some information I provided earlier, just to have all the info in this one posting).

In my home, I have four networked computers.  Most of the time I work out of the office which is the "main" computer.   I have two printers attached to the computer and, at present, neither is set for sharing (because my other computers have their own printer).

The printer I want to use is an HP 5 which has many options such as (1) manual feed, (2) one-side page printing (3) dual-sided printing which can be either head to head or head to foot, and (4) an automatic envelope feeder.

In Windows, (Control Panel - Printers & Faxes), I have set up a "printer" for EACH of the options I may want to choose so that I don't have to modify the printer settings to get the results I want.

Among these "printers" is an "Auto HP LaserJet 5 - Envelopes."

If I choose this printer from Microsoft Word, it correctly retrieves and prints to an envelope.  If I click on a command button in Access, it correctly retrieves and prints to an envelope.  This satisfies me that my printer definition has been set up correctly.

I read, several times, the AlternateDefaultPrinter(printername) documentation on page 61 of the Supplment 1.1 (as you suggested, Ray).

I have come up with this programming:


AlternateDefaultPrinter("Auto HP LaserJet 5 - Envelopes")

Newpage(950,412)
PrintString("Spencer Wulwick (MVR)", 30, 25, 0, "Arial", 14, 0)
PrintString("210 South Hale Avenue", 30, @PageExtentY(), 0, "Arial", 14, 0)
PrintString("Tampa, FL 33609-3933", 30, @PageExtentY(), 0, "Arial", 14, 0)

PrintString(Mail Name, 450, 200, 0, "BArial", 16, 0)
PrintString(Street Address + " " + Apt, 450, @PageExtentY(), 0, "BArial", 16, 0)
PrintString(City + ", " + State + "  " + Zip, 450, @PageExtentY(), 0, "BArial", 16, 0)

FinishPage()



The printing itself is perfect in terms of the merge, placement of print, etc. etc. The PROBLEM is that it does not find the  designated  (alternate) printer and prints to the (default) printer which is letter size.

BECAUSE the description of AlternateDefaultPrinter(printername) says that it "prints to the alternate named printer using the printer's "share" name I EVEN modified the printer definition to allow sharing, assigned a share name and modified the code to "point" to the share name.  It made NO difference and still printed on letter paper.

To "verify" that I understood the programming, I changed the alternate named printer to the OTHER (non-sharing) printer (hp officejet 6110 all-in-one) and it CORRECTLY found and printed to that printer (the problem there is that it doesn't have an automatic envelope feeder).

So, I seem to understand the programming which I can modify to "switch" between my two printers ... but I cannot get it to recognize the envelope feeder in my "Auto HP LaserJet - Envelopes" printer.

As stated previously, being able to print an envelope "on-the-fly" is extremely important to me.  Can anyone come up with any ideas that I might be overlooking?
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Use Report To Address Envelope
Reply #6 - Feb 10th, 2005 at 9:02pm
Print Post Print Post  
Hello Spencer,

If you set your default printer to be your other printer, the hp officejet 6110 all-in-one, and you use the
AlternateDefaultPrinter("Auto HP LaserJet 5 - Envelopes")  command in the programming. Which printer prints?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: Use Report To Address Envelope
Reply #7 - Feb 10th, 2005 at 10:30pm
Print Post Print Post  
Hi Spencer -

Just to muddy the waters, I would use WordMerge to do this, merging to MS Word.  Or mailing labels. Once you've set up Wordmerge you can choose one or the other, or both. The new enhancements to Wordmerge (see Gordon's recent article in Inside Sesame) make it really easy and versatile. I would however use @SyncShell() rather than @Shell for starting Word - see the 1.1 supplement on this.

Good luck!
Alec
  

Alec
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Use Report To Address Envelope
Reply #8 - Feb 10th, 2005 at 10:41pm
Print Post Print Post  
Ray -

And, here, I thought I was being so thorough in my exploration of the problem.  Leave it to you.   Wink

OK, I set the default printer to my HP Officejet 6110 all-in-one printer.  Then I used my Sesame Command Button and it went to the HP LaserJet 5 - (but still on letter-size paper).

So I am sure this tells us "something."  Hopefully you know what that "something" is - cuz I sure don't.  lol

Seriously, Ray, your support is absolutely phenominal so, no matter how I may "joke" I want you to know that I am always appreciative!

     - Spencer
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Use Report To Address Envelope
Reply #9 - Feb 11th, 2005 at 3:34pm
Print Post Print Post  
Good Morning Spencer,

When you get a chance try adding the following line to your code after the AlternateDefaultPrinter("Auto HP LaserJet 5 - Envelopes") call.

Code
Select All
PrintPagePaper(30) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Use Report To Address Envelope
Reply #10 - Feb 11th, 2005 at 4:55pm
Print Post Print Post  
Hi Alec -

I will definitely be setting up WordMerge when I need to print multiple envelopes and for many other reasons.

In this case, however, I just want the envelope for the one record I am viewing and direct printing is virtually instantaneous.  I would hate to have to "wait" for merge to occur in order to print one envelope.

I am familiar with @SyncShell() which resolved a problem I had when playing sound files. Works really nice.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Use Report To Address Envelope
Reply #11 - Feb 11th, 2005 at 5:19pm
Print Post Print Post  
Hi Ray -

Well I'm a little encouraged.  I was hoping there was a "command" to tell it where to get the paper & tried:

Code
Select All
 PrintPagePaper(30)  



The printer obviously recognized it; however, it went to "Manually feed paper." 

Is there another number (in lieu of 30) to try to make it find the envelope feeder?

In case it's any help, here are the tray assignments I used in setting up the printer in Windows:

Auto HP LaserJet - Envelopes

HP LaserJet 5 Device Settings
     Form To Tray Assignment
           Auto Select:  Envelope #10
           Tray 1:  Not Available
           Tray 2:  Not Available
           Envelope Feeder:  Envelope #10
           Tray 3:  Not Available

I believe that tray 1 is the one used for manual feed.

Tray 2 is a 200 sheet feeder

The Envelope Feeder is physically inserted to the computer

Tray 3 is a 500 sheet feeder.

Keeping my fingers crossed and eagerly waiting to hear from you.

Thanks!

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Use Report To Address Envelope
Reply #12 - Feb 11th, 2005 at 5:40pm
Print Post Print Post  
Hello Spencer,

PrintPagePaper(30) tells Sesame that the paper to be printed to is an envelope, not what tray to get the paper from. Sesame then tells the printer that it is going to print on an envelope.

What OS are you on?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Use Report To Address Envelope
Reply #13 - Feb 11th, 2005 at 5:42pm
Print Post Print Post  
Windows XP
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Use Report To Address Envelope
Reply #14 - Feb 11th, 2005 at 6:11pm
Print Post Print Post  
Hello Spencer,

When you get a chance could you follow these steps

Open the Properties for the Auto HP LaserJet 5 - Envelopes printer
Click Printing Preferences
Click the Paper/Quality tab
What does it say in Paper Source?

If it does not say Envelope Feeder, switch it so that it does and let me know what happens when you go to print.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print