February 28, 2022

Use NPR Report to write to the Windows Clipboard (MEDITECH CS)

You can use the following steps to write data to your Windows clipboard from an NPR Report: 

  1. Add the following Footnotes:
    AL START start
    AL D detail
    AL CLOSE.UP close.up

  2. File and translate your report.
  3. Add a macro called start with the following code, then file and translate.
    @Memory.allocate("")^MEM,
    @Memory.beginning(MEM)
  4. Add a macro called close.up with the following code, then file and translate.
    @Clipboard.load(MEM),
    @Memory.clear(MEM),
    @Memory.free(MEM)
  5. Add a macro called detail with the following code:
    DATA_@Z.cr.lf^DATA,
    @Memory.write(MEM,DATA)

    You can replace DATA with whatever you like.  You can use the NPR macro called @Memory.write to write whatever data you like to the memory buffer.  So you are not limited to just doing this in a detail macro.  The start macro creates the memory buffer and the close.up macro copies it to your Windows clipboard.
  6. Retranslate your report.

Topics: MEDITECH, Report Writing, NPR Report, CS System

You Might Also Enjoy

@Translation.message is an NPR Programming Macro that can be used in NPR Report Writer ...

You can modify your report so that everything that prints is sent to your Windows ...

@Pgm.name is an NPR Programming Macro that can come in handy, especially when using the ...

Select the Report DPM NPR.PROC Enter a report name (any name you like) Page 1 will need a ...

Create an NPR Report to produce a downloaded file and add the following Footnote: AL ...