PFPOSTPRINT in a Windows filePro

Scott Walker scottw1 at alltel.net
Fri Sep 22 16:00:20 PDT 2006


Bob,

I'll try to answer your questions below..

Regards,

Scott


Scott Walker
RAM Systems Corp.
scottw1 at alltel.net
Ph: (704) 896-6549
Fx: (704) 896-7458


1. Do you set environment variables before running filePro, or inside
filePro (at what level)?


	Either.  From inside fp you need to use the PUTENV command in a
processing table (that's fp's term for a for a program or script).

	For example:

			putenv "SCOTTS_HOME_DIR","/home/scottw"

	would put the the value "/home/scottw" in the variable
"SCOTTS_HOME_DIR" and put it in the enviornment



2. What exactly do you set the PFPOSTPRINT to?


	Anything you want to happen after fp has produced a report that
has been sent to a file.

	I use it to start up the "viewprt" script to view the contents
of the file using "less".


3. Does this force fP to write the printfile to disk (instead of
printing
it), or does that require a separate operation/variable/configuration?


	That's a previous step that can be accomplished in several ways.
The 	way I do it is by issuing the "printer file" & "printer type"
commands 	in the sort/selection processing table, for example:

	printer file "/tmp/scotts_report"

	printer type "hp3"


	
	1st line above tells system where report should go.  2nd line
above 	tells system what printer control code table to use.




In his example, the command he needs to execute is simply


   c:\program files\printwiz30\printwiz.exe somefilename.txt



I don't know windows batch file or scripting but on the Unix side this
would be trivial.

I would run this report from a script.

In this script I would do (2) things:

	PFPOSTPRINT=/usr/bin/bobs_script;export PFPOSTPRINT

	Run the report with the appropriate rreport command




	In sort/selction processing for the report, set the file name
for the 	report to go to and the print	code table to use.  Put
the name of this 	file in an environment variable (say
REPORT_FILE=somefilename.txt and 	export it with PUTENV command.

After fp is done creating the report and putting it in somefilename.txt
it will execute the command found in PFPOSTPRINT (in this case the
script "bobs_script".

bobs_script would contain this line:

	  
/program files/printwiz30/printwiz.exe $REPORT_FILE



Sorry to have to put this in Unix terms but hopefully it will help.

Regards,


Scott Walker
Scottw1 at alltel.net






More information about the Filepro-list mailing list