473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB 2005 - Print FromPage ToPage?

There have been similar questions raised in the past, however no answers
seem to have been provided, so I thought I'd give it a go.

Scenario 1:
My Windows Forms app generates (say) 10 pages in a Print Preview
Control. These pages are made up of varying sized graphics and text,
therefore each page is unique but does rely on the content of the
previous page to determine the final page layout.

My User wants to print ALL pages, pages 1 & 2 or pages 1 to 4. This
isn't a problem as we all know to exit on the last page we just set
"e.HasMorePages" to False.

Now, my User wants to only print pages 4 to 7, but how can this happen?
As I wrote, each page is reliant on the previous page to know what
images or text will run-over to the next.

Scenario 2:
My Windows Forms app opens a file that is dynamically changing every few
seconds because new information is being added by several other Users.
A report is generated with (say again) 10 pages in a Print Preview
Control. My User decides he would like to print pages 6 to 9. Once
again, how can this happen (without initially taking a snap-shot of the
data) as the .Print Method which generated the original data for the
Print Preview Control will re-generate the data when the
PrintDocument.Print Method is called, thus losing the original
information that was being displayed to the User.

What I guess I'm asking is - How can I print selected pages from an
"existing" Print Preview without having to re-generate the pages and
having to write complex algorithms to determine when to start sending
output to the printer?

Maybe the answer is simple and I'm just missing something here!?!?

In earlier versions of VB I have used 3rd party controls which allowed
you to build your Preview pages and then send whichever pages you wanted
to the Printer without having to re-generate each page. Can we do the
same under VB 2005? What happens if my User wants to print pages 2 to 5
and 7 to 9 from the same document? How are others handling these
situations?

I look forward to reading your replies.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
May 14 '06 #1
0 1619

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: sathyashrayan | last post by:
Following are the selected thread from the date:30-jan-2005 to 31-jan-2005. I did not use any name because of the subject is important. You can get the original thread by typing the subject...
2
by: Pkant | last post by:
I want to Print a txt file with this code : class Printing { PrintDocument prndoc = new PrintDocument(); PrintPreviewDialog ppd = new PrintPreviewDialog();
1
by: Rainbow | last post by:
Hi, I tried to change the print setting by PrintDialog dlg = new PrintDialog(); dlg.AllowSomePages = true; dlg.AllowSelection = true; dlg.Document = pd; dlg.PrinterSettings.MinimumPage = 1;...
0
by: trint | last post by:
Since we have a laserjet 4350tn with 4 paper trays, the .dll from hp of course adds to to funtionality (like being able to select a paper tray under one of the tabs) to the "Print" dialog. I want...
9
by: trint | last post by:
Instead of just sending one document at a time, I need to send multiple documents as a print job because our laserprinter will only stack and staple one printjob it receives at a time. I need to...
1
by: E. W via DotNetMonster.com | last post by:
Hi all, is it possible to configure a printpreview control so that I am able to print selected pages (for example 12-20 like by Word)? Thanks ew -- Message posted via DotNetMonster.com...
6
by: Siv | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.