Total of Pages on a Fwh Report

Total of Pages on a Fwh Report

Postby Pedro Faro » Sun Jan 29, 2006 6:39 pm

Hi

Is it possble to print trought Print object the total of pages of a report ?

ex. Page xx of nn

Regards


Pedro Faro
User avatar
Pedro Faro
 
Posts: 31
Joined: Sun Jan 29, 2006 6:34 pm
Location: Lisboa-Portugal

Re: Total of Pages on a Fwh Report

Postby Enrico Maria Giordano » Sun Jan 29, 2006 6:42 pm

Yes, but you have to generate the report twice. I don't think it's worth the effort.

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

Postby Marcelo Via Giglio » Mon Jan 30, 2006 12:37 pm

Hola,

you can write the page number after of the report finished, because each page of the report is a EMF or WMF file in some directory in your machine (ej. c:\windows\temp), in this way you doin't need to generate the report two times.

saludos

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Postby R.F. » Mon Jan 30, 2006 5:10 pm

First of all you need to undestand how FW create the reports.

FW REPORT Engine is based on a PRINTER object, which creates "draws" of the reports in an image format called "Windows Meta File" or "Enhaced Meta Files" (WMF / EMF). Every time you run a Report o Print object, these files are created in the windows temp directory, then they are previewed and after you close the preview window, these files are erased.

FiveWin has no way to know in advantace how many pages the report will have, because the number of records printed in every single page depends of many factors such printer resolution, paper lenght, font used, etc.

So, as Enrico says, you would need to launch a frist "pre-printing" report, after finished this first report, you know exactly how may pages your report will have, and with that data you would have to re-create the report in order to print the "page n of n"

The other way, as Marcelo suggest, is to directly edit the WMF files, and by hand write the page number on them.

Both solutions are equally complicated.
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: Google [Bot] and 93 guests