Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How would I go about making something too print checks/wire transfers

Status
Not open for further replies.

Snipor

Programmer
Feb 23, 2001
92
US
I developed for this company a type of inventory sales program. To make a long store short, in the long run, it prints out statements of what it owes to customers. Now, they want the option just to automatically print checks and wire transfers from the program. Of course they would need to change out paper between the prints for checks and the prints for wire transfers. So I added a "print" menu option and inside it has "print checks" and "print wire transfers" Now I have the data needed for these things (person name and amount) save to a data file. My question is how would I go about designing what the print out would look like, add the data, and print it out all behind the scenes. Eventually, I am adding the option to view before printing, but for now, they just want it to print. Any ideas?
 
Hi,

You could print everything to a picturebox (or form) using the .print method and determining the position of things with currentX and currentY. You can also use .line, .circle, .pset etc. That will give you a 'print preview' and when the user is satisfied simple replace the name of the picturebox with 'printer' (e.i. printer.print) and it will (hopefully) come out on the printer the way it looked in the picturebox/on the form.

Sunaj
 
I assune you are printing to/on a pre-printed check "form"? If so, you will need to measure the positions of the items fairly carefully. In the print program, set up an array of the positions. To do the printing, use the printer.current[X | Y] (from the array) to position set the printposition and then just print thte appropiate variable(s). You will also need to define the "Form" or papersize for the printer, so you can do the "FormFeed" or printer.newpage operation to get to the next check.

Haven't done the wire transfer, So I cannot advise on that part. MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks for the ideas. I'll look into those. I considered myself a pretty decent VB programmer, but this problem seemed to catch me by the toes. :(
 
Snipor -

Do like MichaelRed says. I did it at two companies ago for IRS form 1099's.

Chip H.
 
Okay completed the wire transfer part. Havn't got the check part done yet. Having a hard time figuring out exactly what to do. Anyway, this is what I did on the Wire Transfer part.

I created the main of the document in word. Incase your not familure with all thats in a wire transfer sheet, there is alot of stuff. So, I used Word for that part and saved it as .rtf file. Now the parts thats I needed to put data into the form I marked with an "*" during design in Word. Then I opened the .rtf file into a RTF text box in visual basic. I then searched for the first "*" and replaced it with whatever data I needed to. Then I searched again for "*" (which would take you to the next one, because you just replaced it with data), and replaced it with the neccesary data. I continued this until all the "*" were replaced. I then printed the text from the box. Then I cleard, reloaded the .rtf file and went to the next payee.

It works great. I'm sure there might be a better way to do this, but this seems to work great and wanted to post it incase anybody needed to ever have use for it. :)
 
If you're goimg to use "word" anyway, you coud do it more easily with a "Main-Merge" operation. All of the search and replace are done in 'AutoMAGIC", as is the replacement of the original blank form. Also, no need to have the RTF test box ... It really isn't that hard to set up the mail merge and it is well covered in the VB & Word help files.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Hey thanks, I'll definetly look into that. :) How would I go about defining the paycheck form size? I havn't figured out exactly what to do there. Any suggestions, or a link maybe that explains it in more detail would be greatly appreciated.
 
Defining a 'paper' size is done from the printer perspective. If your printer does not have the 'Size' you want, you can (usually) install a new paper size. Many programs come with additional printer 'paper size' software. The most common might be the Avery labels, but most financial programs also include paper size additional for 'popular' printers. You can also (VERY CAREFULLY) just 'compute' the paper height and use the info to position the printer. Almost all 'real world' apps which address the check printing issue have gone to perforated forms which are generally standard letter size. The check is one of the perforation sections. Various other 'documents' occupy the other perforations, such as the Company's 'stub', the payees' stub ,,,


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top