Error (6) deleting enhanced metefile

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

Error (6) deleting enhanced metefile

Post by Frank Demont »

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

Post by Antonio Linares »

Frank,

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

Antonio Linares
www.fivetechsoft.com
Frank Demont
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Post by Frank Demont »

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

Post by Antonio Linares »

Frank,

ENDPAGE should be called for each call to PAGE:

Code: Select all

PAGE
   ...
ENDPAGE
regards, saludos

Antonio Linares
www.fivetechsoft.com
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

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