Results 1 to 4 of 4

Thread: printer problem with the printpreview control along wiith the printdocument class

  1. #1

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    printer problem with the printpreview control along wiith the printdocument class

    Dear all,
    I have made a report for displaying workers data and images using vb.net .

    i used a print document control, and a print privew control.

    after a very hard work for a couple of days. i managed to understand how this manual reporting technique works,

    the report now is in a very good shape.

    if it is a mullti oages. it works fine for viewing on screen.

    when i press the print bottom the printing box keeps counting to infinity ( no., of pages far exceeds the real no. of pages in the view.)

    can any one explain in details what is this problem???


    THX in Advance

  2. #2
    Addicted Member
    Join Date
    Apr 2004
    Location
    Lagos, Nigeria
    Posts
    215
    I've had a similar problem before. Mine was because the code for the printing [some variable] were not reset after the print preview.

    I guess your using global variable. I can help if I see your code, can you post it?

  3. #3

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040
    dear robymix,
    i figured out what is the problem, i will advise you the solution.


    in the report document of vb.net, each time a print order is given the printpage event of the print document is invoked. so you should place the printing routine in this event. my mistake was that i coded the print routine in the startup of the page. so it is only done once then every other print jobs is not executed.


    I hope this could help you


    BST RGDS

  4. #4
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    I designed an entire class library around building reports with vb.net printing... call it a poor mans crystal reports I had a similar problem but it was due to teh fat that I referenced to the wrong object I used wrong references... sometimes it's easy to get sloppy


    good luck, printing in vb.net is a charm!!

    Henrik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width