![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is it possible to have printing going to more than one printer at a time? I have some reports that will have to be printed both to Adobe Distiller and to a hardcopy printer. These reports are written using a report master class that uses set printer on and ?. This master class also has an option for output to a form. I see three alternatives: 1) Switch between printers each physical print method call. (There are many of these for a typical report.) This would involve changing my report master class only. I would like to do this, but when I use set printer to name <printername to switch it starts a new print job each time. 2) Modify my report master class to print to a temporary file, then feed that to each printer. This is not too big of a change, but there are bound to be a few quirks. One is capturing changes to paper orientation. 3) Rewrite each report to print the report once for each printer. So much for abstraction. Can 1 be done? It definitely is the smallest change. |
#3
| |||||
| |||||
|
|
1) As you have already observed, each SET PRINTER TO ... starts a new printjob. I don't know of a way in foxpro, to resume an ended printjob. AFAIK, you can't start a second printjob without closing the first. Foxpro supports only one print chanel at a time. |
|
2) I think, it is not a good solution, since there are too many dependencies with the printer drivers involved: paper size/orientation, fonts, colors, positioning... |
|
You could use a temporary file at an abstract level, to resolve these dependencies at the time when copying to the printer. So, this copying must be an active process, not simply moving some bytes from here to there. But then you have something like your version 3, only at an intermediate level. |
|
3) With foxpro commands, I think this is the best solution. What is the problem with this solution? Open the first printer, do your report, open the second printer, do your report again. The only thing to to: open different printers. The report itself should be independent from the printer. This should be very easy, even with ?/?? printing. But you should keep any calculation, that is not related to reporting, off your report |
|
4) You could fiddle around with WinApi, GDI and GDI+ calls to do what you want. But this is a lot of work and it would not integrate with your ? approach. |
#4
| |||
| |||
|
|
2) I think, it is not a good solution, since there are too many dependencies with the printer drivers involved: paper size/orientation, fonts, colors, positioning... The only dependency that I have to worry about is orientation. My reports are plain text: no colour, no bold, etc. Already this paper size/orientation will cause some headache. I don't know your |
|
3) With foxpro commands, I think this is the best solution. What is the problem with this solution? Open the first printer, do your report, open the second printer, do your report again. The only thing to to: open different printers. The report itself should be independent from the printer. This should be very easy, even with ?/?? printing. But you should keep any calculation, that is not related to reporting, off your report What do you mean by calculation not related to reporting? My most complex reports have quite a bit of calculation related to reporting in them. They also are the ones that need to run under the new regime. Other can wait. Some calculations, that may be done only once per report, maybe |
#5
| |||
| |||
|
|
Is it possible to have printing going to more than one printer at a time? I don't know if this is what you have in mind or not, but in VFP 9, in Tools, Component gallery, Catelog, Samples, Solutions, Visual Foxpro Solutions, New in Vfp9, (Gasp! Wheeze!) There is sample code for "Report to several outputs simultaneously using a Report Listener." With these listeners it is possible to output the Report to different targets |
#6
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |