Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Gibson
  Where is Paul Gibson?
 United Kingdom
 Paul Gibson
 To: Octavian Spineanu
  Where is Octavian Spineanu?
 Octavian Spineanu
Subject: RE: Extended info for error 107
Thread ID: 373699 Message ID: 373704 # Views: 36 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Monday, March 25, 2013 4:38:20 PM         

> Hi, I am getting this error on a form when I try to "batch print" customized reports for multiple accounts from a table. The "one-at-a time" button on the form works fine.
> When I trace the error (in the batch-mode program), the error message comes out on the "report form..." line so I have no clue what triggers the error. Is there a way to find out which operator/operand generates this? Thanks...

Firstly I would say that these kinds of errors are often tricky to get to the bottom of. Sadly errors on reports can be tough, especially if it is a fairly busy report.

What do you send into your error handler? I send in the following:

On Error Do ErrorHandler With Error(), Message(), Sys(0), Program(), Lineno(), Sys(2018), Lineno(1)

some of those are fairly self-explanatory but if you log them all they can help find the most obscure errors:

Sys(2018) in particular shows the error message parameter which on some errors (don't know about operator/operand type mismatch tho) is exceedingly useful.

Another thing that can be extremely useful is to output all the information about the currently selected and the currently open-but-not-selected tables/cursor. If you can output the names, the position of the record pointer and the number of total records for each table/cursor then you can often find the culprit if the problem is in data.

Another possibility is to run the Report Form ... line in a try...catch loop where the catch catches the error to an Exception object, something along the lines of:

Local loException AS Exception

	Report Form && .... Complete this
Catch To loException
	* Maybe suspend here if you can replicate this in house
	* Examine all the properties of the object

When the error occurs you might get a clue on the exception object, maybe not though, sadly.

This is rather similar to when a table is corrupted, the application tries to DO a form where the table is supposed to be opened in the DE but rather than throw an error that the table is corrupted VFP throws an error that "something" stopped the form from instantiating. In that case Sys(2018) usually reveals what table is causing the problem.

All of that might be interesting but fail to help. I hope it does but apologies if it doesn't get you any closer.


Extended info for error 107 Posted by Octavian Spineanu @ 3/25/2013 3:09:04 PM
RE: Extended info for error 107 Posted by Paul Gibson @ 3/25/2013 4:38:20 PM
RE: Extended info for error 107 Posted by tushar @ 3/25/2013 4:58:51 PM
RE: Extended info for error 107 Posted by Paul Gibson @ 3/25/2013 5:24:38 PM
RE: Extended info for error 107 Posted by Octavian Spineanu @ 3/25/2013 8:59:31 PM