Pagebreaks in PrintDocument

Pagebreaks in PrintDocument

Post by Magnus Blomber » Thu, 19 Sep 2002 05:58:59



Hello!

I'm using a datatable and printing all rows in this in a PrintDocument.
Now I can't figure out how to make this do a page break.
When using .morepageexists I get all my rows again, though the table is
created in the PrintPage event.

How to do this?

Regards Magnus

 
 
 

Pagebreaks in PrintDocument

Post by Tian Min Hua » Sat, 21 Sep 2002 17:43:33


Hi,

Could you post a sample project which demonstrates the problem?

Regards,
HuangTM
This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

Pagebreaks in PrintDocument

Post by Nauzad Kapadi » Sat, 21 Sep 2002 23:24:06


if u r iterating thru all the rows in your datatable using a counter as
follows

do while i < dt.rows.count-1
    print contents of dt.rows(i).item("something")

    line+=1   ;increment line numbers
    if line > sizeofpage then
        'cause page break
        ' exit loop
    end if
next

make sure i is declared globally. this way when the control comes back to
the PrintPage event after the page break, "i" will continue from where it
left off.

hope this helps.
regards,
nauzad kapadia
www.quartzsystems.com


Quote:> Hello!

> I'm using a datatable and printing all rows in this in a PrintDocument.
> Now I can't figure out how to make this do a page break.
> When using .morepageexists I get all my rows again, though the table is
> created in the PrintPage event.

> How to do this?

> Regards Magnus

 
 
 

1. .NET Add-ins in Excel do not show up in Add-ins

Has anyone been successful in adding custom built-in functions into
Excel via the .net XP Interop assemblies?

According to MS KB 316723, you have to make sure you build the
deployment project for the Current User, not the machine.  I did that.

Also, in the Add-in path for Excel, I added a string called "Automation"
(from a support call to Microsoft) ... but
alas ... no add-in after I install.

Anyone get this to work?

--mike

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

2. MDA interaction, or procmail pointer

3. I want to use the PageBreak in a Form

4. Bargain On CompleteA3000sys

5. PrintDocument Printing to PDF Writer Using DrawString Problems

6. 256 color printing on GS

7. EnumerateMetafile works on PictureBox.Graphics but not on PrintDocument.Graphics

8. Demo Ecstasy

9. PrintDocument control and Generic/Text Only Driver

10. PrintDocument.Print Exception

11. Where is PrintDocument?

12. PrintDocument 'Printing' Dialog