You can not overwrite the pages already created by previous documents in PrintPreviewControl
Example:
PrintPreviewControl1.Document = PrintDocument1
PrintPreviewControl1.Document = PrintPreviewControl1.Document + PrintDocument1
Printable View
You can not overwrite the pages already created by previous documents in PrintPreviewControl
Example:
PrintPreviewControl1.Document = PrintDocument1
PrintPreviewControl1.Document = PrintPreviewControl1.Document + PrintDocument1
I have no idea what you're actually asking for. Your example code makes no sense and if you want to replace already-rendered pages then why did you render them in the first place? You preview the print run and if you want to make changes then you preview again.
Sorry. May have expressed myself badly, I will try to be clearer.
Let's imagine an interface where there is:
1- PrintDocument1
2 PrintPreviewControl1
3 Treeview
Where the treeview node controls the display of PrintPreviewControl the pages, the PrintDocument keeps the report.
The report can be updated, but the information previously generated can not be missed.
example:
At first it generates a 4 pages report, after a new report with 10 pages.
question:
How not override the pages generated in the first report?
There is no "overriding". A PrintPreviewControl is for previewing a print run. If what you want is something other than previewing a print run, which this is, then don't use a PrintPreviewControl.
If what you're saying is that you want to view multiple partial previews and then print the whole lot at the end of it then you'll need to remember the information that generates the previews, e.g. add it to a List, and then perform a single print run at the end using the whole list of data.
In short, either you're going about this in very much the wrong way or you're still not really describing it very well.