Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report error logging in VFP 7

Status
Not open for further replies.

flintstone42

Programmer
Aug 7, 2001
52
US
When you use the reports inside foxpro (frx,frt) files,
If there is an error when the report is printed
(variable not found etc..), The error seems to be always
shown to the user.
There seems to be no way of logging the error.
(on error is not being triggered).

Any Ideas?


P.S. When I put something in the form.error method,
I find I get error that do not occur when I do
not have anything the error event. Ideas?
 

Have you tried a screen-dump to get a picture of the error and save it as document or a bmp that you can view after?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Not a lot of help to your immediate problem but it looks as though the VFP 9 Report Listener will be able to intercept errors in the report so that you can decide whether to tell the user or log them silently.

For the moment (VFP 6 & 8), I'm still following my long-time practice of avoiding report variables as much as possible and doing all my processing beforehand. I really hate debugging reports so I keep them as simple as possible.

Geoff Franklin
 
I have tried to keep my variables in coding but
most of my reports are called from different places
and if more the variables are in the report, the less
coding need changing)

As for the screen print.

The user who gets the error will have to hit print screen
(before any other key is hit) and then email me the
screen print, even then this just give what error
has occured but not where in the report or what
conditions existed when the report run.
(I have on error logging program that capature all
memory varaibles and what DBF are open but it will
be fired by an error inside an frx file(report)


"Simply reports
 
I have tried to keep my variables in coding but
most of my reports are called from different places
and if more the variables are in the report, the less
coding need changing)
I've a similar problem in that a complex Stock Report gets called from lots of places. Instead of saying
Code:
REPORT FORM Stock
all over the place I say
Code:
DO GenStockReport
GenStockReport is a procedure which processes the stock data, produces a cursor holding the data to be displayed, and runs the report. It also accepts several parameters which determine whether I want to print or preview the report, or export it to Excel.

GenStockReport also does a number of other useful things like telling me "This report is empty" rather than trying to print an empty report.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top