You can modify your report so that everything that prints is sent to your Windows clipboard. This is of course only possible for reports running on the Meditech Remote Workstation. Also, it is not possible for reports printed to a Spool file.
The Meditech Remote Workstation responds to the D(30)_"CB"
by storing all subsequent data sent to the Workstation in the Windows clipboard. The D(0)
command instructs the Workstation to stop storing data in the Windows clipboard.
D is called the Decode function in the Meditech programming language. It creates the ASCII character associated with the code provided in parentheses.
Here are the steps:
- Add the following Footnotes:
AL START "DPM.zcus.report.M.print"^/R.TRANS
AL CLOSE.UP close.up
- Replace 'DPM' with your Report DPM and 'report' with the name of your report.
- File and translate your report.
- Create a macro called 'close.up' with the following code, then file and translate it:
IF{@Not(@.pc);
@Z.spool;
@Not(+/TEXT[""]);
/R.HALTED;
@Not(@Z.rpt.found);
D(30)_"CB"^#,
""^TEMP,
DO{+/TEXT[TEMP]^TEMP /TEXT[TEMP]_@Z.cr.lf^#,
""^/TEXT[TEMP]},
D(0)^#}
- Create a macro called 'print' with the following code, then file and translate it:
/R.OUT:0X^/TEXT[-/TEXT[""]+1],
/R.OUT^!;
- Retranslate your report.