Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gathering data for reports
Message
From
07/12/1999 17:28:55
 
 
To
07/12/1999 17:12:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00299994
Message ID:
00300056
Views:
44
>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
Map
View

Click here to load this message in the networking platform