Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: Print Order

  1. #1
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default Print Order

    Hi, we have a tool to view/print orders and other things. When the Print order button is clicked, it prints the last page but not the first. For ex, if the order is 1 page, it prints that page but if the order is 2 pages, it prints the second page but not the first. Any idea how to make it print all the pages? Thanks.

  2. #2
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Could you tell us what version are you on? Let's start from here...

  3. #3
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default

    private void btnPrintOrder_Click(object sender, EventArgs e)
    {
    PrintDocument printDoc = new PrintDocument();
    PrintPreviewDialog printPrevDlg = new PrintPreviewDialog();

    printDoc.PrintPage += new PrintPageEventHandler(this.printDoc_PrintPage);

    printPrevDlg.Document = printDoc;
    printPrevDlg.ShowDialog();

    }

    When I click on Print Order, it sends all (in this case, 2) the pages to the print preview screen but when I click Print on the print preview screen, it only prints the last page (in this case, 2). Why does it not print the first page? Is anything wrong with code? Let me know. Thank you.

    Version: ML 8.0.0.0

  4. #4
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    From what specific code-behind file is this? I can't seem to find it on our solution. It seems to be a custom-made.

  5. #5
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default

    Yes, it is custom code.

  6. #6
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Well, the good way to get around the issue is to set a breakpoint on that event and check if the printDoc variable is correctly pulling the correct page #.