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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing with an overlay

Status
Not open for further replies.

strangeryet

Programmer
Jul 8, 2004
159
US
Is it possible in VB to take a report from a .txt file and create another .txt file including an overlay?
In other words, when we print this report it is printed on preprinted paper. Is it possible to take an image of the preprint and create a new file which looks like the printed report? How can this be done?

Thanks
 
What I have done in a similar situation is open the form image in a PictureBox and then write my data "on top" of that image. It takes a LOT of playing around with the printing locations to get everything to line up. You can then sent the PictureBox's contents to the printer, or to a pdf or whatever.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
You could use VB's Datareport and insert an image as your background and then use a ADO disconnected recordset as your recordsource to print the text.

Swi
 
Thanks for your help. I was hoping to do this in a Vb job that would pretty much do hundreds of these in a loop.
The datareport and picturebox ideas...can this behandle 'behind the scenes' in VB?

Thanks
 
Also, how do you write 'on top' of the picture box?
(Create text boxes over it?)
And then how do you print the contents of the picture box?

Thanks
 
Yes, you don't even need to display the datareport. Just use the PrintReport method of the datareport instead of showing it.

Insert the picture in the data report using the ReportImg tool. You then add you text boxes in the appropriate places and right click on the images and select Send to Back. This should work.

Swi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top