Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print multiple files during one print job

Status
Not open for further replies.

kel1981b

Programmer
Jan 3, 2003
82
US
I need to print multiple rtf/rpt files during one printing job. Actually, it does not matter which file rpt/rtf will be appended. I need run one print job. I know that there is no way to append/merge "lovely" Crystal Reports rpt files (got message from Seagate People). So my question, is there way to append/merge rtf files to one file? If there is no way like that, may be I can use another way. Let's say send different files to the same printing job.
Any advise, help will be highly appreciated
 

Yes there is a way to merge 2 or more rtf files into one rtf file. Use a couple of RTF boxes and check out there sel properties, or if you do want to go with the multiple files as a single print job then check MS on the Job Object.

Good Luck

 
vb5prgrmr thanks for you reply. Unfortunately, it's not that clear for me how I can use report files with 'couple of RTF boxes'.
About Job object. I've never used it before. I tried to find some information on MSDN but was not able to find something usefull for me. Do you know something more about this object and how can I use/reference it in VB Application? I'll be very thankfull for any help.
 

From your origional post I assumed that you have crystal reports creating a rich text file "it does not matter which file rpt/rtf will be appended" and you either wanted to combine those RTF files into one file or print either the RTF or RPT's as one job. If this is so then read on, else jump down a couple of paragraphs.

Ok, first I'll talk about RTF (RichTextBoxes). To add them to your project right click on your toolbox. A dialog will come up and you will need to scroll down until you see Microsoft Rich Textbox Control. Select it and click on OK.

Now that it is added to your toolbox lets add two of them to a form. Call them RTB1 and RTB2. What you would do is have the first RTB (RTB1) open the first RTF file and have the second RTB (RTB2) open the next RTF file. You would then cut and paste (via code) the contents of RTB2 to the end of RTB1 and keep repeating this process for each file that needs to be added to the first.

Now for the job object object. Check out the following API's to get you started ...

CreateJobObject
AssignProcessToJobObject
SetInformationJobObject
QueryInformationJobObject
TerminateJobObject

This once again assumes that you are using or have access to Win2k to accomplish this. Prior win versions are unsupported.

I Hope this helps. Good Luck


 
Hi vb5prgrmr. Thaks for your try! Unfortunately, CreateJobObject is not going to work for me because some of our clients, can you believe or not, still use Win98. Besides, I am not sure that that will work even with WinNT.
About RTF boxes. You was right about rpt/rtf files. I know how to use this control but, when you loaded rtf file created by CR into RTF box, it significantly changes file graphical patern. I am still working on that but I am afraid it's not going to work neither. Anyway, thatks again for your time. I really appriciated it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top