Normal Topic Print to one pre-printed form (Read 787 times)
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Print to one pre-printed form
Mar 17th, 2011 at 1:35pm
Print Post Print Post  
I have four fields of data from a result set that I need to print to one pre-printed form. So, I may have a list of ten names, addresses, account numbers, and phone numbers that need to be printed to one page.  My thought is that I would want to use PrintString commands so that I can pinpoint the positions of each piece of data from each field so that the data fits in the pre-printed forms’ “boxes”.  Can’t figure out how to make it work, and is this the best way to go about it?

Thank you
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Print to one pre-printed form
Reply #1 - Mar 17th, 2011 at 1:42pm
Print Post Print Post  
This is exactly what PrintString is for. Where are you having trouble?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Print to one pre-printed form
Reply #2 - Mar 17th, 2011 at 1:53pm
Print Post Print Post  
For example, if I look at the list in a writeln window I get all the names. Just drawing a blank on how to separate the list so that the first name in the list goes to the first box on the form and the second name into the next box, etc.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Print to one pre-printed form
Reply #3 - Mar 17th, 2011 at 5:22pm
Print Post Print Post  
You'll need to have an offset for y position that correctly positions the second name on the second line, etc.

If the first name on the list should be at a y position of 200, and the lines should be 25 pixels apart, then this code ...

Code
Select All
var vList as String
var vLoop as Int
var vCount as Int
var vYPos as Int
var vOffset as Int

	vList = "Apple;Cherry;Orange;Grape;Banana"
	vYPos = 200
	vOffset = 0
	vCount = @CountStringArray(vList)
	For vLoop = 1 To vCount
		vOffset = (vLoop - 1) * 25
		WriteLn(@AccessStringArray(vList, vLoop) + " would print at y position " + @Str(vYPos + vOffset))
	Next  



... can be used to produce this result ...

Apple would print at y position 200
Cherry would print at y position 225
Orange would print at y position 250
Grape would print at y position 275
Banana would print at y position 300
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Print to one pre-printed form
Reply #4 - Mar 17th, 2011 at 6:49pm
Print Post Print Post  
Outstanding Erika!

Thank you.
  
Back to top
IP Logged