Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help required with VFP5 Automation Server
Message
From
18/06/1998 16:31:58
Ryan Hirschey
Federal Reserve Bank of New York
New York City, New York, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00109600
Message ID:
00109673
Views:
29
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform