DarrenWard
IS-IT--Management
I have several reports that use the following function;
FUNC _np
_temp = son
skip
if eof() or son <> _temp
skip -1
return .t.
else
skip -1
return .f.
endif
Then set the PrintWhen property on the totals of the reports to _np(), this then only prints the totals on the last page of multi page documents.
The problem I get is when I run the code I get the following error on the skip line.
THISFORM can only be used within a method
If I Ignore the error the report prints correctly. I have tried moving the function and re-writing it, if there was a problem with it I cant understand the error type that is being reported.
I have run the code in vfp6.0 and vfp8.0 with the same problem, have called the function from different reports, any ideas?
Dazz GuiltyMaggot - The best rock band in the world!
FUNC _np
_temp = son
skip
if eof() or son <> _temp
skip -1
return .t.
else
skip -1
return .f.
endif
Then set the PrintWhen property on the totals of the reports to _np(), this then only prints the totals on the last page of multi page documents.
The problem I get is when I run the code I get the following error on the skip line.
THISFORM can only be used within a method
If I Ignore the error the report prints correctly. I have tried moving the function and re-writing it, if there was a problem with it I cant understand the error type that is being reported.
I have run the code in vfp6.0 and vfp8.0 with the same problem, have called the function from different reports, any ideas?
Dazz GuiltyMaggot - The best rock band in the world!