Hi all,

Could someone guide me with the following task I'm trying to achieve?

I have a products table with loads of data and name of some jpg files. I want print out the entire contents along with the images. And yes, I have spent hours trying to figure the PrintDocument control, measure string, drawstring functions etc, but I'm not getting anywhere.

The most main issue is about the new page. e.g. if I said

while not rs.eof
e.graphics.drawstring(somefield)
e.graphics.drawstring(somefield1)
e.graphics.drawstring(somefield2)
e.graphics.drawimage(someimage)
e.graphics.drawimage(someimage1)
e.graphics.drawimage(someimage2)
end while

I'm having a few main issues

* splitting up the field so that it's text is sent to the next line when it is longer than the margin.
* checking the image size and resizing it to fit it inside the margin
* and the hasmorepages. I haven't got a clue how to know what was printed last because of the fact that the contents are printing from a loop. I believe that a static variable would be useless in this case if at least the while loop was put inside the printpage handler.

I'm almost pulling my hair for this one...

Thanks Everybody.
T