Printing a report to a WMF file 
Author Message
 Printing a report to a WMF file

Greetings,

I'm generation a report which I am trying to send to a fax.  That is easy,
just send it to the fax printer driver!  Well the problem is that the
process cannot be automated like that due the the phone number cannot be
sent with to the fax software.

What I can do is use DDE and send the phone number and file attachments to
the fax software.  The problem is that need to first print my report to a
known file name and save it on the disk, then reference the file name as an
attachment which the DDE command can send to the fax software.

So,  how is it done or has somebody got a template (lib/dll) to overcome
this problem?

Pointer in the right direction would be greatly appreciated.

Regards,
Lance



Fri, 11 Apr 2003 03:00:00 GMT  
 Printing a report to a WMF file
Spend 29$ on the word preview template from
capesoft.com/clarionshop.com

install it in 30 secs.

Torben Balle

On Mon, 23 Oct 2000 20:27:09 +1000, "Lance Veitch"

Quote:

>Greetings,

>I'm generation a report which I am trying to send to a fax.  That is easy,
>just send it to the fax printer driver!  Well the problem is that the
>process cannot be automated like that due the the phone number cannot be
>sent with to the fax software.

>What I can do is use DDE and send the phone number and file attachments to
>the fax software.  The problem is that need to first print my report to a
>known file name and save it on the disk, then reference the file name as an
>attachment which the DDE command can send to the fax software.

>So,  how is it done or has somebody got a template (lib/dll) to overcome
>this problem?

>Pointer in the right direction would be greatly appreciated.

>Regards,
>Lance



Fri, 11 Apr 2003 03:00:00 GMT  
 Printing a report to a WMF file
Copied from Robert Stanics hompage

http://members.easyspace.com/rstanic/

How to save report-Preview in WMF

"Inside the Global Map" embed:

Include('clib.clw')

In the Clarion template chain there is the perfect candidate for the
code to do this.  No idea about the ABC templates.  What we must do
first, is declare a few cstring variables.  I'd suggest doing this in
the global data embed as then you can use this in all your report
procedures:

Glo:Path   Cstring(256)
Glo:Drive  Cstring(256)
Glo:Dir    Cstring(256)
Glo:File   Cstring(256)
Glo:Ext    Cstring(256)
Glo:PathToCopy Cstring(256)
Glo:NewName    Cstring(256)
Glo:FileName   String(255)
DosFile     File,Driver('DOS'),Name(Glo:FileName),Pre(DOF),Create
Record        Record
              End
            End

First you would use the Loc:PathToCopy to stuff in where you want the
files to be copied to.  Also, let's asume you want them to be called
1.wmf, 2.wmf etc. depending on the page number.  Now, in this perfect
embed of ours, we would do something like this:

Do CopyReportPages

and then create a routine:

CopyReportPages   ROUTINE
Data
Rec   Long
Ret   Long

Code
Glo:PathToCopy = '.\'
Loop Rec = 1 To Records(PrintPreviewQueue)
   Get(PrintPreviewQueue,Rec)
   Glo:Path = Clip(PrintPreviewImage)
   Ret = FnSplit(Glo:Path,Glo:Drive,Glo:Dir,Glo:File,Glo:Ext)
   Glo:NewName = Glo:PathToCopy & Rec & '.wmf'
   Glo:FileName = Clip(PrintPreviewImage)
   Copy(DosFile,Glo:NewName)
End

This copies the file(s) to the current directory.  I've tested it and
the report looked just as well in PaintShop Pro after reading it in as
1.wmf as it did in the preview<g>  

Now.  An additional step would be a viewer.  Using the Directory
function you could create a simple program that looked up *.wmf files
in a directory, stuffed the queue into a listbox on the left side of
the window and put the report as thumbnail or whatever on the right
side.  Alternatively you might want to use a number for each report,
so that you could say, use 10000001.wmf for one report, 20000001.wmf
for another report, then build some control system over which report
is which.  Then you could have multiple reports stored...  Hmmm...
This has now prompted me to do some more research into this<g>  Now,
all you need is the single line Include('Clib.clw') line in the
"Inside the Global Map" and a simple source procedure:

Create a new procedure, call it CopyReports

Prototype:   (Queue pPVQ, String pdir,Long pRptNr)
Parameters:  (Queue pPVQ, String pdir,Long pRptNr)

Data section embed:

Rec   Long
Ret   Long

Loc:Path   Cstring(256)
Loc:Drive  Cstring(256)
Loc:Dir    Cstring(256)
Loc:File   Cstring(256)
Loc:Ext    Cstring(256)
Loc:PathToCopy Cstring(256)
Loc:NewName    Cstring(256)
Loc:FileName   String(255),Static
DosFile     File,Driver('DOS'),Name(Loc:FileName),Pre(DOF),Create
Record        Record
              End
            End

Processed code embed:

Loc:PathToCopy = Clip(pDir)
Loop Rec = 1 To Records(pPVQ)
   Get(pPVQ,Rec)
   Loc:Path = Clip(pPVQ)
   Ret = FnSplit(Loc:Path,Loc:Drive,Loc:Dir,Loc:File,Loc:Ext)


   Loc:FileName = Clip(pPVQ)
   Copy(DosFile,Loc:NewName)
End

You can now call it from ALL your reports to save the reports:

CopyReports(PrintPreviewQueue,'.\',1)

The first parameter is the preview queue which stores the image files.
The second parameter is the path to copy to (in this case current
directory) and the third parameter is the number of the report.  For
the first 2 pages in report nr. one it would copy to a file named:

00100001.wmf
00100002.wmf

for report procedure nr. 2 it would be:

00200001.wmf

On Mon, 23 Oct 2000 20:27:09 +1000, "Lance Veitch"

Quote:

>Greetings,

>I'm generation a report which I am trying to send to a fax.  That is easy,
>just send it to the fax printer driver!  Well the problem is that the
>process cannot be automated like that due the the phone number cannot be
>sent with to the fax software.

>What I can do is use DDE and send the phone number and file attachments to
>the fax software.  The problem is that need to first print my report to a
>known file name and save it on the disk, then reference the file name as an
>attachment which the DDE command can send to the fax software.

>So,  how is it done or has somebody got a template (lib/dll) to overcome
>this problem?

>Pointer in the right direction would be greatly appreciated.

>Regards,
>Lance



Fri, 11 Apr 2003 03:00:00 GMT  
 Printing a report to a WMF file
Thanks,  I will check it out.

Regards,
Lance


Quote:
> Copied from Robert Stanics hompage

> http://members.easyspace.com/rstanic/

> How to save report-Preview in WMF

> "Inside the Global Map" embed:



Sat, 12 Apr 2003 07:59:34 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. copy temporary report wmf.file to permanent wmf

2. add multiple WMF-images to 1 WMF-file

3. WMF Report file location

4. Get WMF files from Report

5. Problems using WMF files in CFW 2003 Reports

6. Scaling .wmf file in a Clarion report header

7. How do I print a saved WMF File?

8. Printing Report Writer report to a file?

9. Converting PDF files to WMF files

10. How to convert WMF files to RTF files?

11. Report output to wmf

12. Report WMF pages without Pre-viewing

 

 
Powered by phpBB® Forum Software