Page 1 of 1

Delay in PREVIEW dialog in REPORT.PRG

Posted: Mon May 01, 2006 5:57 pm
by E. Bartzokas
Hi all,

I have noticed a very significant delay in the 32-bit Fivewin REPORT.PRG, which poped up the dialog, but took over one second to draw on a 3.7 GHZ PC.

Whoever wants to fix this problem, please perform the following change to the REPORT.PRG provided by FWH. To be sure you are performing the change to the correct point, please search for the following (in the code) string in spanish language, then change the ::oRptWnd:bPainted line (two times).

(I wish all comments were at least bilingual, but alas, such is the world today) :(

Code: Select all


   /*
   Creaci¢n de la ventana de impresi¢n
   */

   IF !::lScreen

      DEFINE DIALOG ::oRptWnd TITLE ::cName RESOURCE "PRINT_PROC"

      REDEFINE BUTTON ID IDCANCEL OF ::oRptWnd ;
         ACTION (::lBreak := .T., ::oRptWnd:End()) ;
         WHEN (!::lNoCancel)

      REDEFINE SAY oPagina VAR ::nPage ID 101 OF ::oRptWnd

      ::oRptWnd:bPainted := {|| iif(::nPage>=0, oPagina:Refresh(), )}  // added >= vs. >  28/apr/2006 EVANS

      ::oRptWnd:bStart := {|| ::Play(),::oRptWnd:End()}

      ACTIVATE DIALOG ::oRptWnd CENTER

   ELSE

      DEFINE DIALOG ::oRptWnd TITLE ::cName RESOURCE "PREVIEW_PROC"

      REDEFINE BUTTON ID IDCANCEL OF ::oRptWnd ;
         ACTION (::lBreak := .T., ::oRptWnd:End()) ;
         WHEN (!::lNoCancel)

      REDEFINE SAY oPagina VAR ::nPage ID 101 OF ::oRptWnd

      ::oRptWnd:bPainted := {|| iif(::nPage>=0, oPagina:Refresh(), )}  // added >= vs. >  28/apr/2006 EVANS

      ::oRptWnd:bStart := {|| ::Play(),::oRptWnd:End()}

      ACTIVATE DIALOG ::oRptWnd CENTER

      Eval( ::bPreview, ::oDevice )

   ENDIF

RETURN NIL

Re: Delay in PREVIEW dialog in REPORT.PRG

Posted: Mon May 01, 2006 7:21 pm
by Enrico Maria Giordano
It is already there in the latest FWH release as

::oRptWnd:bPainted := {|| If( ::nPage > 0,oPagina:Refresh(), ) }

EMG

Re: Delay in PREVIEW dialog in REPORT.PRG

Posted: Mon May 01, 2006 7:54 pm
by E. Bartzokas
EnricoMaria wrote:It is already there in the latest FWH release as

::oRptWnd:bPainted := {|| If( ::nPage > 0,oPagina:Refresh(), ) }

EMG
Enrico,
You probably did not notice my change to ::nPage >= 0 versus ::nPage > 0

Kind regards
Evans

Posted: Mon May 01, 2006 7:56 pm
by Antonio Linares
Evans,

Please change cTempFile() function source code as explained here:
http://fivetechsoft.com/forums/viewtopi ... =ctempfile

Re: Delay in PREVIEW dialog in REPORT.PRG

Posted: Mon May 01, 2006 7:58 pm
by Enrico Maria Giordano
E. Bartzokas wrote:
EnricoMaria wrote:It is already there in the latest FWH release as

::oRptWnd:bPainted := {|| If( ::nPage > 0,oPagina:Refresh(), ) }

EMG
Enrico,
You probably did not notice my change to ::nPage >= 0 versus ::nPage > 0

Kind regards
Evans
Sorry.

EMG

Posted: Mon May 01, 2006 9:57 pm
by E. Bartzokas
Antonio Linares wrote:Evans,

Please change cTempFile() function source code as explained here:
http://fivetechsoft.com/forums/viewtopi ... =ctempfile
Antonio,
Thanks for the advise, which is excellent, however, I have already developed a similar system based on a similar approach in our source code a long time ago now.

I still like to thank you for taking the time to send me your good advise.
Kind regards / saludos

Evans