I'll be cautious here as I have no information about hardware/systems configs and so on, so the specifics of a solution are not definable. Also whether Timezones are a factor that need to be allowed for on an operator by operator basis, BUT maybe something along these lines would work ...
Set up a script on a machine somewhere (maybe local to the user ?) which produces a single record output file giving system time. Set this up to refresh at appropriate intervals - every second or every minute or every 10 minutes, etc. whatever resolution is sensible.
Add another field to your model for Current Time and set this to a value that is unlikely to be real (say 9999999999 or whatever). Join the existing model to your 'single record database' for 'Current time' and add the time to your working data set. The elapsed time calcualtion can now be added, et., etc.
As I said, not definitive but I hope it will provide some directions to investigate.
V6 would help in other ways. For instance you could simply prompt the user for the current time at run time and then do the calcs using the Elapsed Time calculations and field type.
Another idea which, though simplistic, may work under some circumstances, especially if the original report is a 'snapshot in time' rather than a real time read and display. (The snapshot implies that the data was valid then but may have changed since ... so a time constrained comparison would seem appropriate).
Process the original report/data to get the specific fields you require. Print the selceted data and any new fields to another report and include the Date and Time in the page header (functions available for this).
Provide the users with a new model which uses the new report data AND the Date and Time info from the page header as the basis for its data so that you can include calculations based on the date AND TIME the new report extract was created.
Set up a schedule for the process so that a new version of the output is available at a known interval appropriate for the requirement. Every minute if required and if the processing times available from the systems involved would make this a sensible option.
There could be a number of variations along these general lines depending upon operational needs. Couold be that you give the users a script that gets the original report as of 'now', runs the initial interpretation and output of the new file then presents that with the new model.
Just a thought or two. Hope they spark some solutions. Other alternatives using VB code and so on should also be considered I guess.
The report I use is an error report that has errors made by users, date and time stamped. I need to tell them how old the error is the moment they run my model. I unfortunately still use Monarch v 5.02 pro, and the only function I can find that somewhat resembles what I need is TODAY(), but that only gives current date, not current time. Any Ideas???[/b][/quote]
Thank you for your suggestions, Grant - that will for sure help - but your 2nd suggestion brings me to another question - how would I print e.g. a table to a file so that I can reapply monarch to it - assume would have to use a 'text only' printer driver or something like that and then the print to file option in Monarch???? If you can advise me the details I would appreciate it
You assumed correctly Michael. Exactly how you set up the printer will depend on the Operating system but basically create a new printer using Manufacturer "Generic", Printer "Generic/Text Only" and Port "FILE:" when asked. That should do it.
I note that Win XP, unlike Win 98, has several options under the 'Generic' manufacturer. I suggest keeping things simple, but play if you have the time!
Before Printing the table or summary, but from the table screen (for example), go into "File/Page Setup" and add what you want to see in your report page header. Space it out as you want it and with the data on the lines you wish to use. Save the model and the header format will be saved with it.
'Print' the report and select your new 'Generic/Text Only' printer (or whatever you called it). Give the file a name (default extension will be .PRN) and save it wherever you want.
Open another instance of Monarch and use File/Open to access your new report. It should display just like any other report ready for modelling in the normal way. (Obviously you don't have to run Monarch twice BUT, when you are playing with the development project, it can make life quicker and easier!). There are also some parameters to play with under 'Page Setup' and 'Options/Export and Print'.
As solutions go I'm afraid it's not very elegant but it is simple and should work.
Hope this helps you to progress with your requirement. Good luck.
Thank you for your suggestions, Grant - that will for sure help - but your 2nd suggestion brings me to another question - how would I print e.g. a table to a file so that I can reapply monarch to it - assume would have to use a 'text only' printer driver or something like that and then the print to file option in Monarch???? If you can advise me the details I would appreciate it[/b][/quote]
[size="1"][ January 04, 2003, 08:15 PM: Message edited by: Grant Perkins ][/size]