Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report doesn't see field, but it's there
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01229721
Message ID:
01229726
Views:
11
>>I was designing a report and in the command window I executed the SQL statement to retrieve the data from the 4 or 5 tables involved. One field is COMPANY. It comes from the customer table related on CustNo from the main table. No problem. I can then do a preview on the report and it works fine. So I take the same code and run it from the program and when I execute the report it says "variable COMPANY is not found." I have a BROWSE NORMAL command right after the SQL statement and right before the call to the report. The COMPANY field is there as clear as day, yet I get this error. It's a bit mystifying at the moment. Anyone have any thoughts?
>
>Could this Forms with Grids and printing reports FAQ #15515 apply, for any chance?

It does have a grid, but that was not it. The problem was (kind of) the BROWSE NORMAL. Normally my reports are printed from a separate form, which is based on a form class for reporting. In this case, however, the report is printed straight from the data entry form. The Activate of the base class for this form selects the main table for the form. So when I did the BROWSE NORMAL, right after I closed it, the form became active momentarily before the report came up in preview mode. This caused a reselect of the main table for the form and caused the report to fail. Just out of curiosity, I set the focus to the grid and printed the report with no problem Do you have repro code on that grid/report bug or have you just seen it happen at times. Maybe that issue is something similar to what I saw, which was certainly not real obvious.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform