In an earlier blog tip I showed how to add an “Echo Name” feature to a MAGIC NPR report, but I did not show a method to do the same thing for Client/Server because I assumed I’d need to use the %NPR.UI programs to write data to the screen and fight the Syntax Checker, which attempts to block any calls to %NPR.
One of my staff, Ken Mohr, happened to read the tip and sent me the following easy technique you can use in a report to echo the name below the mnemonic.
First you add a computed field below the mnemonic field with an “IG” (Ignore) selection operator.
We are then going to attach an “AFI” attribute to the first field and call @Display() to get the name to echo. Unfortunately in the most recent versions of C/S, the syntax checker for screen attributes will object to this, so we cannot do it this way (which worked for Ken at a 5.66 C/S site):
Instead we have to write a macro attached to our report, built as a program:
Then we can use the Edit Elements routine to edit the mnemonic field, so that our program to display the name will execute after input in the mnemonic field.
The xx.name field gets an IFE=”” so the cursor won’t stop there:
When we run the report, after a doctor mnemonic is selected, the name displays in the “display only” field we have created below the mnemonic field on the selection screen.
Macros even through 6.07 C/S NPR seem to allow calls to @Display().
P.S. AFI attributes are not allowed in a MAGIC NPR report screen.
If you need more help…