General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>The error is that "the variable 'total' could not be found". total is actually a cursorname, and it's the records in 'total' that I need summed and used in my report.
Does the error occur in the report, or the SQL statment? If its in this code you posted:
public pcTotal
public pcValue
pcValue = Thisform.pageframe1.page2.sz1.displayvalue
SELECT data1.total ;
FROM lumber!data1 ;
WHERE siz = pcValue ;
INTO Cursor totals ;
pcTotal = sum ( totals ) ;
Where? I'm thinking: sum ( totals ). Totals needs to be in quotes. I'm not sure what all the semi colons are for, try this:
cValue = alltrim(Thisform.pageframe1.page2.sz1.displayvalue)
SELECT data1.total ;
FROM lumber!data1 ;
WHERE siz = cValue ;
INTO Cursor totals
SELECT Totals
cTotal = sum ("totals")
THen run the report. Is this onbase?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only