S
Siv
Hi,
I am getting into printing with VB.NET 2005 and want to implement the usual
capability that a user can select a selection of pages. I have a report
that is generated by my application that if the user wants all pages will
produce 3 pages. I want to offer the user the ability to select via the
print dialog that only pages 1 and 2 of it are printed or possibly pages 1
and 3 but not 2.
At the moment I can produce all three pages either as a print without a
preview, or via a print preview.
I have printing routine that handles the PrintPage event of the document
object used for this report.
My issue is how do I work out when the print handler routine is called which
of the pages is being printed at the time, ideally I want to have a select
case statement in my printing routine that says:
Select Case MyDoc.PrinterSettings.PrintRange.PageNumber
Case 1
'Printing command for page 1
Case 2
'Printing command for page 1
Case 2
'Printing command for page 1
End Select
I feel like I am missing something and am probably making this mor
ecomplicated than it is?
Any help, or links to web sources that describe the process would be
appreciated. I have 3 books on programming in VB.NET and none of them cover
the subject of how you deal with printing a selection of pages. I also
cannot find anything by googling that deals with this issue.
Siv
I am getting into printing with VB.NET 2005 and want to implement the usual
capability that a user can select a selection of pages. I have a report
that is generated by my application that if the user wants all pages will
produce 3 pages. I want to offer the user the ability to select via the
print dialog that only pages 1 and 2 of it are printed or possibly pages 1
and 3 but not 2.
At the moment I can produce all three pages either as a print without a
preview, or via a print preview.
I have printing routine that handles the PrintPage event of the document
object used for this report.
My issue is how do I work out when the print handler routine is called which
of the pages is being printed at the time, ideally I want to have a select
case statement in my printing routine that says:
Select Case MyDoc.PrinterSettings.PrintRange.PageNumber
Case 1
'Printing command for page 1
Case 2
'Printing command for page 1
Case 2
'Printing command for page 1
End Select
I feel like I am missing something and am probably making this mor
ecomplicated than it is?
Any help, or links to web sources that describe the process would be
appreciated. I have 3 books on programming in VB.NET and none of them cover
the subject of how you deal with printing a selection of pages. I also
cannot find anything by googling that deals with this issue.
Siv