>I try to use NOWAIT clause in REPORT command.
>
>I have found that clickig Print button in Report Preview window
>is completely ignored in VFP 7. In VFP 5 GPF occurs.
>Why clicking to Print button is ignored ?
>
>Steps to reproduce: run the following code and click Print button.
>
>
>CREATE CURSOR test ( test c(20) )
>INSERT INTO test VALUES ( 'line 1' )
>INSERT INTO test VALUES ( 'line 2' )
>CREATE REPORT test FROM test
>REPORT FORM test PREVIEW FOR RECNO()=1 NOWAIT
>
>
Andrus,
Your code crashes in VFP6. So, it looks like by ignoring the Print button in VFP7 is a bug fix (a feature) <g>.
Perhaps most people don't combine NOWAIT and PREVIEW (and a FOR clause), because NOWAIT/PREVIEW combination causes the data environment to disappear when the code continues.
One workaround is to use a private datasession for the report, which would preclude using the FOR clause. Personally, I prefer to create a cursor with SQL select statements before running the report. The NOWAIT clause may still cause problems even in that scenario.
See
1001 Things you Wanted to Know book for more information.
HTH,
Steve Gibson