Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>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?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement