How to fetch print status from print preview screen for SmartForms
Normally there’re three methods to print out one Smartforms:
- Print out directly without preview and no print setting popup window;
- Print out with the Print button at the print setting popup window;
- Print preview button at the print setting popup window, then Print button at the print preview screen.
For point 3, the standard program of NAST processing already considers this potential leak point. And the solution is simple and effective: just grey out the print button on the print preview screen.
But what if the user wants to keep the print button on the print preview screen for some customized printouts separated from NAST processing? Then how to fetch the status of the SmartForm printout if further actions like customized DB updates must be carried on when the user clicks the print button at the print preview screen? If the user clicks BACK to the caller program after printout at the print screen, then no issue as the caller program can get all user command at that time. What if the user closes the preview window after printout at the preview screen?
The solution is also simple:
- The field SSFCRESCL-OUTPUTDONE will return whether a printout occurs or not from preview windows.
- The field SSFCOMPOP-TDIEXIT will Immediately exit after printing/faxing from the print preview, the user has no chance to close the print preview window after clicking the print button.
There’re lots of other control parameters that can be used for various purposes. After so many years, I am still not aware of most of them : P