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

> >
> > When you come to the REPORT FORM line while tracing it in the debugger, instead of running the code, you can try modifying it and taking a preview.
> This is definitely a better suggestion than mine.
> I have tried deliberately making a 107 error inside a report and neither Sys(2018) nor the Exception object offer any useful insights into what is possibly causing the error. I know what is causing the error because I created a simple report with three textboxes on it, two of them perfectly valid and one with a deliberate 107 error on it.
> Following Tushar's suggestion I put a break into the program, when the exception was thrown I did a:
MODIFY REPORT && ... complete this

> ...in the command window, then went to Preview the report and was presented with this screen:
> which obviously shows where my error is and from there it's a doddle to fix.
> (as a side issue, I would always recommend to anyone beefing up their error handling to report lots of information about the current state of the system)

Paul, your first post was very useful as a free lesson into the importance we need to give to error handling....Again and again, "programmers" like me go by the principle: "If I don't make ANY errors EVER, why would I need an error handler??" :) Lesson learned.

Tushar, I tried your tip, but differently from Paul's example, I did not get the faulty expression, probably because there wasn't any....Again, this report runs fine when a set of records pertaining to a single account is selected.
Then I decided to replace the "REPO FORM..." with "BROW" and got an interesting message "Object is not contained into a form"
This pointed me in the right direction, a filter I am applying on the main table, that references form objects...
As soon as I replaced the filter with a SELECT....WHERE &filter INTO &cursor, all went smooth.
I have to discover now why is it working on:
Form->select dates->select-account->Print custom report 1 (the filter on table does contain form.object.values....)

and not on:

Form->select dates->Print custom report 1 for customer 1, Print custom report 2 for customer 2 and so on...

Anyway, problem solved, thank you guys for the prompt answers!!:)
Cheers, Octavian


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