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

I got to print out my data on a form! 1

Status
Not open for further replies.

hdougl1

Programmer
Dec 6, 2000
54
US
Help, I need and a good direction on printing out a form. The data will come from an array, textboxs, and labels, the rest will be static. Not sure what the best direction would be. Thanks in advance
 
???? are you trying to 'Print' on a pre-printed form? Like an Application for [Loan | Employment | Credit ...]? If so, it is somewhat tedious - but very easy / straight forward. Up to a point.

JUst set up an array (Of UDTs) for each field to be printed. Include the various properties (Top, left, field (variable) name to print, the font Name and size ... ).

Send the list of variables to the routine. In the routine, just move the cursor to the appropiate location, set the font and font size (and what ever other parameters necessary) and print the field. Move to the next field ...

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
No, I was not very clear. I need to create a printed
report with data from an array and other controls. Like a formatted Access report and print to paper.
Thanks

 
Well, I still do it much the same way. I just include the 'Pre-Printed" elements in the array / list of Items. I have tried a number of variations on the approach, but unless you are going to the thrid party stuff (Crystal Reports) it is really just that - variations on the theme.

Make the list of 'objects' to print with their attributes. Get the Dynamic elements (fields). Loop throuhg the list setting the position and (Font) attributes. Do the next one. For the general condition of reporting (the columar list of many instances of the object), you need to keep track of the used / available real estate, so when the Vertical position runs off the bottom of the page, you can finish the current page and start the next one (with the sam / different "header" section. Likewise, you need to "justify" the fields within their allocated space, but it is really simple - just tedious.

MichaelRed
mred@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