473,793 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to combine two PrintDocuments or...

add them into one PrintDocument:
PrintDocument pd1 = new PrintDocument() ;
PrintDocument pd2 = new PrintDocument() ;

PrintDocument pdCombined = new PrintDocument() ;
pdCombined = pd1 + pd2;
pdCombined.Prin t();
Thanks,
Trint

Nov 16 '05
24 8178
Trint,

A couple of other notes.

First, you do realize that you don't need the static variable Class1.pd
in order to get your hands on the paper sources for the printer from
within pd_PrintPage. You can get that this through the
PrintPageEventA rgs, like this:

ev.PageSettings .PaperSource =
ev.PageSettings .PrinterSetting s.PaperSources[...];

Second, I just want to clarify my previous note about the combo box. I
understand what you're trying to do in selecting different paper
sources (I think that you see that it's working, just not the way that
you want). I just don't understand why you're involving a combo box. It
looks to me as though

ev.PageSettings .PaperSource =
ev.PageSettings .PrinterSetting s.PaperSources[comboBox1.Selec tedIndex =
4];

is exactly the same as

ev.PageSettings .PaperSource =
ev.PageSettings .PrinterSetting s.PaperSources[4];

I don't understand why you're involving the combo box at all. I think
that I need to know what was the business requirement behind the combo
box thing... what was the original idea that led you to use a combo box.

Nov 16 '05 #21
Ok,
It is working...is exactly as you have said...thank you. But, it is
printing in this order for some reason??:
tray 4
tray 2
tray 3
You were also right about the indexing number of the devices...I got
that from the explanation MS gave on papersourcekind ...they said that I
have to do a retrieve of the devices index first...
Anyway...
the second report:
These reports I did like Crystal Reports, but with MS SQL Server 2000
Reporting Services.
they are located in those paths...the real names of the reports are
Report1.rdl (the one with the prices) and Report2.rdl (the one without
the prices).
I haven't figured out how to render the Report2.rdl yet anyway...I
mean, I can create a second PrintReport function that will render the
2nd report, but now that we have this, I don't know...at least we are
pull from three separate trays now...
Good question...How can I render the second report before
PrintPageEventA rgs release to print the job?
Another thing, you probably already know...this rendering Must be done
as an enhanced meta-file or "emf" since MS says, that is the only
format that rs.render can determine how many pages a report is. You
have no idea how you are helping me.
You are a Good Programmer.
Thanks for your help.
Trint

Nov 16 '05 #22
You mean more than one document? Patience. One thing at a time. Let's
get the multiple copies working first. :)

Trint... I'm thinking that we should take this conversation out of the
newsgroup and into e-mail. It would be quicker and wouldn't annoy all
of these other people with our chatting back and forth about your
specific problem.

Any objections?

Nov 16 '05 #23
That is great, my email is:

tr***********@g mail.com

The construction guys are making all of IT leave until in the
morning...
Before I go out the door, do you think it is possible to (without me
jumping ahead) render the second report and add it to the printjob as
the same document?
How do you know these undocumentd features anyway?
Thanks,
Trint

Nov 16 '05 #24
The second report? You mean another invoice number, or the third copy
without prices?

If you want to finish up one thing today before you go, let's get the
e-mail conversation started. I'll send you an e-mail right now. If you
get it, you can reply and we can carry on the conversation that way.
Much better, I think.

Nov 16 '05 #25

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

Similar topics

3
2724
by: Nick | last post by:
I am working a new application...well actually a series of applications for my company. They want internal users to be able to go to a site and everything regarding security is transparent, however we will have brokers and customers that also need to connect and will require a username and password. In this case we were going to store their credentials in a SQL database. Internal users will have the ability to access the same resources...
1
5855
by: William Stacey [MVP] | last post by:
I need a bullet proof way to combine a root and a relative path to form a FQ rooted path (similar to a VDir in IIS). Path.Combine alone will not do the job in all cases. I also need to be sure the no funny business can go on in the passed "path" that would produce a path not in the root (i.e. "..\..\dir1"). Here is my first stab at it, but not sure if this is too much or not enouph to ensure this. Any thoughts are welcome. TIA. ///...
13
2553
by: Alison Givens | last post by:
....... that nobody knows the answer. I can't imagine that I am the only one that uses parameters in CR. So, my question again: I have the following problem. (VB.NET 2003 with CR) I have a report with a multiple-value discrete value and a rangevalue. The report shows fine in the viewer, but when I hit the export to pdf
5
1321
by: pjfarley3 | last post by:
Hi all, First-timer here, with a question about composing XML and XSL. I have a need to send one XML file with NO external server references to an end-user browser window; i.e., I would like to be able to do something like having the href in the "xml-stylesheet" declaration be a "local" reference, something like this: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="#Local_xsl"?>
8
5638
by: Mir Nazim | last post by:
Hello, I need to write scripts in which I need to generate all posible unique combinations of an integer list. Lists are a minimum 12 elements in size with very large number of possible combination(12!) I hacked a few lines of code and tried a few things from Python CookBook (http://aspn.activestate.com/ASPN/Cookbook/), but they are hell slow.
3
8211
by: Schroeder, AJ | last post by:
Hello group, I am a relative PHP newbie and I am trying to combine two arrays together, but I also need to keep the keys of one array intact. What I am doing is two SNMP walks against a Cisco router in which I expect the script to return the interface number along with a small description of the interface type, like this: Array (
0
1155
by: shinisen | last post by:
is it possible to combine jsp and asp?
10
1685
by: Terry Olsen | last post by:
I need to be able to write to a file simultaneously from approximately 4 different threads. I'm working on a program that will download parts of a file and combine the parts. Each thread will have an offset from zero and a length to write. None of the threads will overlap in the file position. Is it possible to have the file open (shared) by multiple threads? I'm guessing that i'd use a filestream with some sort of sharing. Looking for...
0
1003
by: Andreas | last post by:
Hi When creating a windows application you get a specific file and folder structure when you compilte your code. I was wondering what sort of control (perhaps not using VS.NET but other tools and command line) I have to influence the way the output is made? At the moment I would get something like this App bin
0
9671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10433
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10161
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.