Delay in PREVIEW dialog in REPORT.PRG

Delay in PREVIEW dialog in REPORT.PRG

Postby E. Bartzokas » Mon May 01, 2006 5: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 ::oRptWnd:bPainted line (two times).

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

Code: Select all  Expand view

   /*
   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
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Re: Delay in PREVIEW dialog in REPORT.PRG

Postby Enrico Maria Giordano » Mon May 01, 2006 7:21 pm

It is already there in the latest FWH release as

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Delay in PREVIEW dialog in REPORT.PRG

Postby E. Bartzokas » Mon May 01, 2006 7:54 pm

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
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Antonio Linares » Mon May 01, 2006 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Delay in PREVIEW dialog in REPORT.PRG

Postby Enrico Maria Giordano » Mon May 01, 2006 7:58 pm

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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby E. Bartzokas » Mon May 01, 2006 9: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
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests