Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable not found when hitting print button
Message
De
14/02/2011 13:34:46
 
 
À
14/02/2011 05:16:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01499836
Message ID:
01500132
Vues:
70
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform