KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Freeing up 4D Client using the Execute on Client Command
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: June 25, 1999
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Previous to 4D Version 6.5, heavy processing such as printing or running lengthy reports was frustrating because it bogged down the client application. Having to run a report and then use the left over CPU time for other work was not efficient. This caused delays in the user's productivity. Now, there's a better way.

The frequently sought after feature of communicating between 4D Clients is now a reality. The new command, EXECUTE ON CLIENT, allows client to client communication. A user can now run a report, or any method, on another client without having to tie up their CPU. This allows the user to continue working without having to wait for the report to finish. Another possibility using this new command is inter-client messaging.

To implement this feature you must first register the client in one of two ways. Registering the client tells 4D Server that the client is present and willing to execute methods sent to it by other clients. The first option is to use the new command "REGISTER CLIENT". This command can be run at startup or any other time depending on the application. The second option is to have 4D Server automatically register the clients on connection. This can be set in the database properties.

Once the client is registered it is available to receive commands from other clients using the EXECUTE ON CLIENT command. The following code will run the report, "Monthly_Sales_Figures" on the client registered as, "Report Client".

EXECUTE ON CLIENT("Report Client";"Monthly_Sales_Figures")

If multiple reports are sent to a client using EXECUTE ON CLIENT, the client will stack the request in the order they were received.

Note: A list of available clients can be retrieved from 4D Server using the new command GET REGISTERED CLIENTS.