Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable not found when hitting print button
Message
From
14/02/2011 13:51:58
 
 
To
14/02/2011 13:34:46
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01499836
Message ID:
01500135
Views:
61
I clearly misunderstood your problem. Do you have a grid on the same page? See FAQ #15515

>>>>I have seen many time that VFP is too quick for itself, so to say. Sometimes the only remedy is to add a little delay, like Inkey(0.2,'H').
>>>
>>>Any advice on where to add this? Before the call to Report Form? Perhaps is some sort of dummy function that would print blanks in the page header?
>>>
>>>Thanks......Rich
>>
>>You get an error message that a variable is not found. If you know what variable is not found, I would add the delay just after this variable is initialized.
>>
>I probably didn't explain the problem correctly. Here is the code section where I get the error
>TRY 
>     SELECT &csrProjStatus
>     alias1 = ALIAS()  &&-----> ProjOpenTasks
>     ds1 = SET("datasession")      && -----> 2
>     REPORT FORM "Reports\" + lcReport + " " PREVIEW &&  -----> Report is displayed correctly on the screen
>CATCH TO oError  && ----> generated by pressing NextPage/LastPage/Printer button on toolbar (but not Zoom)
>     alias2 = ALIAS() && -----> crsTask
>     ds2 = SET("Datasession") && -----> 2
>     IF oError.ErrorNo <> 1
>          MESSAGEBOX(oError.Message, 48, _screen.Caption)
>          SET STEP ON 
>     ENDIF  
>ENDTRY 	
>
>When it hits the REPORT FORM command the report displays properly on the screen. There is also a Report Toolbar with buttons for NextPage, LastPage, Printer, etc. When I press the Printer button the error is generated. The same error is generated with the NextPage/LastPage button.
>
>Somehow the active work area has changed. I can't find where it changes becuase the error does not repeat if I run with the debugger active.
>
>FWIW, this same report is available from another portion of the system. It runs through the same section of code and this error does not get generated. Any suggestions as to what could be causing the switch in work areas (modal/modeless screen??????) are greatly appreciated.
>
>Thanks again............Rich
Previous
Reply
Map
View

Click here to load this message in the networking platform