Isolved this issue by creating a public variable:
PUBLIC _npagetotal
_npagetotal = 0
Then, using the ReportListener component to control the reports, analyze the pagetotal property after the report runs. If it returns <> 0, it means there was content in the report and if it returns 0 (zero), there was no content.
*/ control of printed pages
_npagetotal = 0
LOCAL loreportlistener
loreportlistener = CREATEOBJECT("ReportListener")
loreportlistener.LISTENERTYPE = 0
loreportlistener.QUIETMODE = .T.
REPORT FORM pathgeral + '\report\danfe_nfce_2.frx' OBJECT loreportlistener
_npagetotal = loreportlistener.pagetotal
RELEASE loreportlistener
IF _npagetotal<> 0 THEN
* PERFORMS AN
ENDIF ACTION
PUBLIC _npagetotal
_npagetotal = 0
Then, using the ReportListener component to control the reports, analyze the pagetotal property after the report runs. If it returns <> 0, it means there was content in the report and if it returns 0 (zero), there was no content.
*/ control of printed pages
_npagetotal = 0
LOCAL loreportlistener
loreportlistener = CREATEOBJECT("ReportListener")
loreportlistener.LISTENERTYPE = 0
loreportlistener.QUIETMODE = .T.
REPORT FORM pathgeral + '\report\danfe_nfce_2.frx' OBJECT loreportlistener
_npagetotal = loreportlistener.pagetotal
RELEASE loreportlistener
IF _npagetotal<> 0 THEN
* PERFORMS AN
ENDIF ACTION
Comments
Post a Comment