Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 4th, 2004, 08:26 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: , Kent, United Kingdom.
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing Multiple Pages

I am having trouble printing to more than one page, at the start of my print document, I set hasmorepages to true and I set it to false at the end of the report. But when the printing message appears it always says print page 1 of document. How do I tell it to print page 2 etc?


Thanks in Advance
Louisa

  #2 (permalink)  
Old June 7th, 2004, 04:19 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: , Kent, United Kingdom.
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using this code, I have put it at the end of the report, however each time it hits the if the line count is always the same, as it seems to be printing the first page over and over again.

If LineCount > LinesPerPage Then
            ev.HasMorePages = True
            LineCount = LineCount - LinesPerPage
        Else
            ev.HasMorePages = False
            MessageBox.Show("Report Finished", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
End If

Louisa

  #3 (permalink)  
Old June 7th, 2004, 09:17 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

It doesn't look like it would work... how does reducing the line count help? I don't see anything here to cause you to move to the next page.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Multiple Pages raja.tadi VB How-To 0 June 26th, 2006 05:19 PM
Printing multiple pages at a go leo_vinay ASP.NET 1.0 and 1.1 Professional 0 November 3rd, 2005 07:22 AM
Printing pages ken killeen VB.NET 2002/2003 Basics 0 October 27th, 2004 07:31 AM
Printing Several Pages Louisa VB.NET 2002/2003 Basics 1 April 8th, 2004 09:26 AM
Printing Web Pages gaghazoul VBScript 0 February 5th, 2004 02:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.