Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WEXIST() problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00606840
Message ID:
00606845
Vues:
23
The window name is "Printing...", not "Printed...".

Also, IIF(WEXIST('Printed...'), WasReportPrinted = .T.,WasReportPrinted = .F.. is not a valid expression for On Exit.

Do this instead:
EXECSCRIPT('WasReportPrinted = WEXIST("Printing..."))
If you're not using VFP7, you can't use EXECSCRIPT() so you'll have to put the statement in a UDF that you call from On Exit.

Cathy


>Hello FoxPro developers,
>have a problem with WEXIST('Printed...'). I was trying to determine if the report was printed or just previewed. I did found a couple of articles about this problem and I thought I am all set. But I was wrong and I can't figure out what is wrong, everithing looks pretty striaght forward.
>I declared a report logical variable WasReportPrinted and in the Summary OnExit I've entered this expresion:
>IIF(WEXIST('Printed...'), WasReportPrinted = .T.,WasReportPrinted = .F.. On the Init event of the report I've set it to .F. The reset for this variable on the end of report. In the Variable settings dialog box initial value for this variable and value to change is a variable iteself and release after report is 'no'. The problem is that the value of this variable is never changing! I mean ever, even after report was printed it still .F. I check the value of the WEXIST('Printed...')in the Init, BeforeCloseTables, AfterCloseTables and Destroy Events and it is always .F.. I am doing something wrong but can't figure out what.
>Another thing that WEXIST() is the function that return .T. or .F. if the UDF Window exists. But 'Printed...' is NOT UDF window, right?
>Can anybody help? I am using VFP 7.0 and MM Framework but I think MM got nothing to do with VFP Report Generator.
>Thank you very much.
>Igor
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform