Delay in PREVIEW dialog in REPORT.PRG

Post Reply
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Delay in PREVIEW dialog in REPORT.PRG

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

Re: Delay in PREVIEW dialog in REPORT.PRG

Post by Enrico Maria Giordano »

It is already there in the latest FWH release as

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

EMG
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

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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

Re: Delay in PREVIEW dialog in REPORT.PRG

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

Post 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
Post Reply