Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable Not Found
Message
 
 
To
28/01/2009 21:10:23
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01377964
Message ID:
01377971
Views:
17
Rich,

The problem is so common (VFP bug) that I'm surprised you haven't run into this before.

See Forms with Grids and printing reports FAQ #15515

>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
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform