I have a client for whom I look after with a customised account package had me move there system to a terminal server. Everything works great. I had minor issues like printer setups i.e. Crystal reports doesn’t print courier new font properly to a printer that is redirected from the client computer. These were a nuisance but not that hard to fix.
We wanted the operators to only access this package on the terminal services and nothing else. This I achieve via an icon that automatically logged them in. The user settings on Terminal Server automatically started the software and all is good.
Except that this doesn’t provide the window task bar and only administrators can change the system date – with good reason obviously. This provides a problem for a couple of the book keepers that from time to time back-dated their computers to finalise the previous months books for the company. They can no longer do this. So how could a provide them the ability to enter transactions into the account system as if they were doing them of a particular date different to the current system date without affecting the orders, quotes, invoices and purchase orders that other departments needed to do.
My solution was to store a “date difference” for each client via a client specific configuration file or in the registry. A panel that shows the date displays on the main screen. A double click event handle on that Delphi form brings up a “date picker dialog”. The date selected is compared to the current system time with the difference between stored in the configuration as the date difference. I created a function and with using GReplace (a multiple file find/replace utility) replace all occurrence of the sysutils.Date call with my new function call. It actually has taken me longer to explain it on this post than actually do it. All I have to do now is put the system through some testing to check all is well and we’re all good. For good measure the panel color is set to red when the date difference is not zero as a reminder to the operator.