Keeping Tabs (OpenInsight Specific)
At 29 SEP 1999 09:03:37PM Marty Rosenbloom wrote:
Hi,
I am maintaining a data base of absentee employees. This data base is updated daily. I print out a report monthly that I send to my client. Now, however, my client has asked me to reprint the reports from previous months.
I thought about printing to a file but that locks me into the same printer for the next few years. Is there some other way to do this? I have also tried copying the table but I am having trouble attaching the table permanently programmatically.
Any help including sample code would be appreciated.
Marty
At 30 SEP 1999 08:38AM Tony Marler @ Prosolve Software wrote:
Marty
Can you not just have a history table and report on this using a data range.
If you do want to copy a table and then attach and save the database use the Attach_Table and Define_Database stored procedures.
Tony
At 30 SEP 1999 08:39AM Don Bakke wrote:
Marty,
Why can't you export the data and then format it in Word?
dbakke@srpcs.com
At 01 OCT 1999 10:55AM Marty Rosenbloom wrote:
Tony,
I did try using Attach_Table and Define_Table but I couldn't get them to work. I am obviously doing something wrong. I have had to take some time away from this programming but I will try it again.
Marty
At 01 OCT 1999 10:57AM Marty Rosenbloom wrote:
Don,
I'm still learning new things with OI. How do I export the data to be used in Word?
Marty
At 01 OCT 1999 12:27PM Don Bakke wrote:
Marty,
If you are familiar enough with Basic+ then simply write a program to OSBWRITE everything to an OS file, making sure it's conveniently delimited for importing (e.g. Tabs between fields, CR/LF's between rows.)
Then have Word or Excel bring the data in and you can format it from there and save this as a historical document for future reference.
My assumption was that you can not or do not want to create an archive/history database. If you did that then your reports would simply need to run against that table. Otherwise, the Word/Excel option is the only general way I know to keep old reports that aren't printer specific.
dbakke@srpcs.com
At 01 OCT 1999 01:46PM Marty Rosenbloom wrote:
Hi Don,
I do want to keep an archive/history database, I just don't know how.
HELP!!!!!
Marty
At 01 OCT 1999 03:22PM CT Savell wrote:
Copy all the records for each month into a new "HISTORY" file adding the end date as an additional KEY to each record. Then clear your monthly file. It is best to put the end date as a key to speed retrieval.
At 02 OCT 1999 12:59PM Marty Rosenbloom wrote:
Hi,
Thanks for your patience and understanding.
I don't program with OI very often so some of this is new to me. How do I copy all the data to a "HISTORY" file and add the date as my KEY.
Thanks,
Marty
At 02 OCT 1999 03:47PM CT Savell wrote:
OK, I think Don, Tony and I assumed you were familiar with RLIST from ARev or REVG. But one should never assume.
There are a number of ways to do this. The best way is for you to create a form with scripts tied to events, like CLICK a button, to automatically do the copying for you each month.
To get started you should create a HISTORY file from you current MONTHLY file using the Copy_Table command. (There are other ways to create this HISTORY file as well). Then go into the Database Manager, select this new HISTORY file and add a new dictionary item "DATE" and specify it as a KEY item.
Now to copy the data each month from the MONTHLY file to the HISTORY file you should write a program script tied to your "CLICK" event where you would use the Copy_Row routine with the date (perhaps user specified in an EditBox, or just the system date, or whatever) inserted as an additional key item to the destination key list.
These things are explained in the Programmer's reference manual or can be accessed from the system editor by typing a word like "Copy_Table" or "Copy_Row" then press the key on your keyboard.
Good luck.
Tom