WhelkMaster 46 Newbie Poster

Hi folks,

I'm trying to print the rows of a DataTable using the PrintDocument and PrintPreview dialog. I get one page appearing in the preview window with the same stuff printed on it time and time again. I have to cancel the printout, as it runs to hundreds of pages although there are only 200 rows in the DataTable.

I've assigned a handler for the PrintPage function as in the examples but I'm not sure how I would make it throw a new page after every, say, 20 rows of the DataTable.

:?:

Could anyone be so kind as to point me in the right direction..?

Thanks for your time.