>I am trying to achieve the following, and I wondered if some kind person could give me the basics and pseudo code for it.
>
>A VB comms program, which is continuously running, needs to print a VFP report whenever it has received a certain message. This seems the ideal situation for an Automation Server. The VFP server needs to be passed a job number, perform an SQL SELECT on various Fox tables, and report the result to a printer.
>
>How should the VB program call the VFP Automation Server, and how should the VFP Automation Server be constructed (and built) to receive the job and print it. The job will always exist.
>
>TIA, Kevin
The VB program can call the VFP server with the Createobject command, something similar to the following:
VB code
DIM oVFPServer as Object
SET oVFPServer = createobject("VFPServer.Report")
oVFPServer.PrintReport(1) ' 1 is the job number you want to pass
In VFP you can create an olepublic PrintReport method in a class that accepts the job number using the lparameters statement.
Let me know if you need more info.
Ryan Hirschey