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:
AL START "DPM.zcus.report.M.print"^/R.TRANS
AL CLOSE.UP close.up
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)^#}
/R.OUT:0X^/TEXT[-/TEXT[""]+1],
/R.OUT^!;