crewchiefpro6
Programmer
I have a weird report issue that I have not seen before. In Fox 9.0 I run a report that works fine when run from the command window. It will also work perfectly in the application until the 2nd page where it will say Variable xxx Not Found. The name of the so called variable is actually a field name.
There is a variable defined to count records, but that is it.
I break on a field called iYear and normally it pops up with an error Variable iYear not found.
Just for fun I put the statement:
iYear = 2006
just before the report form command and it got rid of the message for that "variable" BUT it then said Variable Stocknum Not found. Stocknum is also a field in the driving database.
Weird thing is when I run it by selecting the code in the menu it works just fine, no errors at all.
Here is my simple code:
local lcSelect
lcSelect = select()
IF USED("invrey")
SELECT invrey
USE
ENDIF
SELECT 0
USE data\invrey EXCLUSIVE
INDEX ON STR(9999 - iYEAR,4) + imodel TAG yearmod ADDITIVE
SET ORDER to tag yearmod
REPORT FORM reports\invrey.frx FOR UPPER(invrey.inewused) = "U" AND iyear > 0 preview
DELETE TAG all
SELECT((lcSelect))
Don Higgins
There is a variable defined to count records, but that is it.
I break on a field called iYear and normally it pops up with an error Variable iYear not found.
Just for fun I put the statement:
iYear = 2006
just before the report form command and it got rid of the message for that "variable" BUT it then said Variable Stocknum Not found. Stocknum is also a field in the driving database.
Weird thing is when I run it by selecting the code in the menu it works just fine, no errors at all.
Here is my simple code:
local lcSelect
lcSelect = select()
IF USED("invrey")
SELECT invrey
USE
ENDIF
SELECT 0
USE data\invrey EXCLUSIVE
INDEX ON STR(9999 - iYEAR,4) + imodel TAG yearmod ADDITIVE
SET ORDER to tag yearmod
REPORT FORM reports\invrey.frx FOR UPPER(invrey.inewused) = "U" AND iyear > 0 preview
DELETE TAG all
SELECT((lcSelect))
Don Higgins