Applies to: reports that print to metafiles and a PrintPreviewQueue; posted in the Clarion 6 group.
Problem
A report process copies the preview WMF files to a temp folder, using a Report Process Manager code template, and a PDF tool turns each into its own PDF. For 3300 records this takes about 12 minutes, and the poster needs 10000+ PDFs every weekday. He asked where the preview engine keeps the WMF files and whether they can be used without copying.
Solution
- The PrintPreviewQueue is a single-field STRING(260) queue. Each record holds the fully qualified file name of one page's WMF file, in page sequence. The FilePathClass (filepath.inc and clw) can split those names.
- PROP:TempNameFunc sets where the WMF files are generated, so they can be named as the PDFs need to be named.
- The WMF files are only deleted when the report is closed or flushed. To keep them, copy the PrintPreviewQueue records to your own queue (or to a text file) and FREE the PrintPreviewQueue before the report closes. Then process the files later.
- Another suggestion: store the names in a TPS file with an auto-increment key to keep the order, plus values for the PDF INFO fields (Author, Title, Subject, Keywords), and let a separate EXE poll the file, make the PDFs and delete each record and WMF file.
- A user group presentation on hand-coding reports shows how the WMF files end up in the preview queue.
Caveats
- Files kept this way are yours to delete.
- The poster chose PROP:TempNameFunc plus copying the queue and asked which report embed runs before the queue is cleared; the thread does not answer it.
Today (2026)
Not re-tested. The queue and property names are from the Clarion 6 era; check them in the current help before relying on them.
Sources: Chris M. (Jun 2004, the question), Leonid C., Dan G., Craig R. (Jun 2004) in softvelocity.public.clarion6.