Good Evening Dan:
1 and 2: Yes. I wrote a prg to create a cursor to populate a report and all 
worked as expected.
I then took the code and placed it in a method on a form. I click the print 
button on the form and the cursor gets generated and populated and then I issue 
the standard report form report name to print. When the report runs I get a 
variable not found error. That variable was a field name in a previous cursor 
with the same name as the current cursor file name.
3: Different reports. The first report has about 10 fields and the second that 
errors out has about 30 fields. They are not executed in sequence.  In fact, I 
run the second report without running the first with the same error message. So 
something must be trapped in the scx. When I take the method code out out the 
scx and paste it back in a prg the report runs as expected with no errors.
As a something to try in the form I added that field name to the cursor and the 
report now returns a different variable not found. The variable was also in the 
first cursor.
I thought perhaps the foxuser was the culprit so I deleted it and I get the 
same results.
Apparently the variable is saved in the scx and and it 'thinks' it needs to be 
in the second report.
How do you clear this out??? I the hundreds of reports I have written I have 
never seen this. And I am a creature of habit and always use tTemp for my 
cursor name for reports. BTW, all the other reports  in the system run as 
expected using the same tTemp cursor name...
Like I said I created a dummy report with one field from the cursor and get the 
same results.
I am sure it is not the report becuase it runs fine from the prg...
Thanks for any insight!
Best regards,
Jack

Sent from my iPad

On Oct 3, 2013, at 9:27 PM, "Dan Covill" <[email protected]> wrote:

>
> Jack,
>
> Not quite clear on a couple of points.
>
> 1) You create a cursor and then do a Report Form.  You then took the code to 
> create the cursor and put that in a method of the report.  Correct?
>
> 2) Assuming you start with a 'do Report Form ...', what calls the method and 
> how?
>
> 3) You talk about the first and second reports.  Same report form or 
> different ones?  Same code in same method or different?
> Are they executed in immediate sequence?
>
> Dan Covill
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to