Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable Not Found
Message
De
28/01/2009 21:10:23
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Variable Not Found
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01377964
Message ID:
01377964
Vues:
70
I'm running into this problem when I call a report and when I try to change pages. The code is
SELECT stuff INTO CURSOR crsPrint READWRITE
do some stuff with crsPrint to tweak the data
REPORT FORM myReport PREVIEW
At first when I try to run the report it would show up with the variable not found error message.

So I put a breakpoint in and found that this wasn't the active workarea. Ok.......... I put SELECT crsPrint immediately before the call to REPORT FORM and tried again. SAME PROBLEM. The cursor was still not selected. Has anybody seen this before?????

Next try was to wrap all this in a TRY-CATCH block
SELECT stuff INTO CURSOR crsPrint READWRITE
do some stuff with crsPrint to tweak the data
TRY
     REPORT FORM myReport PREVIEW
CATCH
     SELECT crsPrint
    REPORT FORM myReport PREVIEW
ENDTRY
The wierd thing is that it was now always pointing to the correct cursor the first time. But the problems are not over. There is a different manifistation of the same problem. The first page displays properly but the "Variable Not Found" error is now there when I try to go to the next/last page.

The missing variable is actually a field in the cursor. The Report Form has many Data Groupings based upon various values for this field. There are groups for Variable = 1 thru Variable = 8 although the actual data cursor has MAX(variable) = 3

Any information, suggestions, etc. appreciated...............Rich
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform