FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Delay in PREVIEW dialog in REPORT.PRG
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Delay in PREVIEW dialog in REPORT.PRG
Posted: Mon May 01, 2006 05:57 PM
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 ::bPainted line (two times).

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

   /*
   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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Delay in PREVIEW dialog in REPORT.PRG
Posted: Mon May 01, 2006 07:21 PM

It is already there in the latest FWH release as

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

EMG

Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Re: Delay in PREVIEW dialog in REPORT.PRG
Posted: Mon May 01, 2006 07:54 PM
EnricoMaria wrote:It is already there in the latest FWH release as

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

EMG


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

Kind regards
Evans
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Delay in PREVIEW dialog in REPORT.PRG
Posted: Mon May 01, 2006 07:56 PM

Evans,

Please change cTempFile() function source code as explained here:

http://fivetechsoft.com/forums/viewtopi ... =ctempfile

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Delay in PREVIEW dialog in REPORT.PRG
Posted: Mon May 01, 2006 07:58 PM
E. Bartzokas wrote:
EnricoMaria wrote:It is already there in the latest FWH release as

::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
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Delay in PREVIEW dialog in REPORT.PRG
Posted: Mon May 01, 2006 09:57 PM
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

Continue the discussion