Tuesday, November 4, 2014

How to prevent the printing of a report

To prevent the printing of a report, you can create a specific processing for the report and put the following code in the file:

Subprog IMPRIME(NBPAR, PARAMETRE)
Value Integer NBPAR
Variable Char PARAMETRE()()
If ... ... ... ...
    GOK=0
Endif
End


The principle is that when you set GOK to 0, the report will not be printed. Of course, you have to substitute the dots after 'If' with the appropriate condition. For example, suppose that you print a report from the Deliveries function (GESSDH) and you want to print it only if the delivery is validated. To prevent the printing otherwise, you might have:

Subprog IMPRIME(NBPAR, PARAMETRE)
Value Integer NBPAR
Variable Char PARAMETRE()()
If [M:SDH1]CFMFLG<>2
    GOK=0
Endif
End

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.