Error (6) deleting enhanced metefile

Error (6) deleting enhanced metefile

Postby Frank Demont » Tue Jan 31, 2006 10:22 am

Hello

I know , it is not the first time it is asked , but when i do a search , all intresting posts are in spanish , so who can give a solution in ENGLISH ?

Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Antonio Linares » Tue Jan 31, 2006 10:51 am

Frank,

Please check that you are not calling ENDPAGE twice.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Frank Demont » Tue Jan 31, 2006 11:16 am

Antonio

Can we test that calling ENDPAGE is needed or not ?

I suppose that when it is called , the EMF-file from this page is deleted , so if it not exist , ENDPAGE should not be called.

How do we know the name from the current emf-file page ?

Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Antonio Linares » Tue Jan 31, 2006 3:36 pm

Frank,

ENDPAGE should be called for each call to PAGE:

Code: Select all  Expand view  RUN
PAGE
   ...
ENDPAGE
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby R.F. » Tue Jan 31, 2006 5:26 pm

Frank:


Frank Demont wrote:Antonio

I suppose that when it is called , the EMF-file from this page is deleted , so if it not exist , ENDPAGE should not be called.


No way !!!!!, You have to understand a little how the FW printing system works:

When you do a PRINTER oPrn...... what are you doing is to retrieve all the printing data from the default printer driver or from another printer if you choosed FROM USER or directly used the TO "printer name" statements.

All these data (resolution, paper size, number of bins, etc) is now stored in the printer object.

When you performe a "PAGE" command, you are allocating a space IN MEMORY where you will be able of "drawing", these draws will be the oPrn:Say() or the oPrn:InchSay() or whatever. Once you have finished drawing in memory, the ENDPAGE command will write that memory space in EMF or WMF file, now you can do another new PAGE command of simply finish the printing session with and ENDPRINT command. You have to perform a PAGE...ENDPAGE operation for every single page in your report.

When you reach the ENDPRINT command, and if you specified the PREVIEW clause in the printer command, the preview window will be launched and you will be able to see all the files written by the print command, when the PREVIEW window is running, you can also send these files to the printer and once the preview window is closed all the report files are automatically erased.

If you didn't specified the PREVIEW clause, the EMFs or WMFs will be send to the printer and after that they will be erased.

So, you never have control over the EMF/WMF file erasing process.
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 75 guests