>Hello,
>In my application I have to make automatic printouts of receipts.
>It should normally not be possible for the user, to print one receipt manually twice, because it is a document. But what, if the printer strikes? So I would like to append the report info into a simple text file that the document-info is not lost, which should not be a problem. But I don't want to get this file too big. Say, after a while, the oldest entries should be deleted automatically, when a certain size of the file is reached.
>How can I do this?
>Thanks in advance.
I've done this in DOS - when print file sizes were still in a reasonable range. The master record for the document had a memo field for this purpose. We printed each document into a file (overwriting the previous file, so it always contained only one document in printable form), and did
append memo prnfile from (prnfilename) over
and did it only once per document. Now you may want to log printing of each file (username, date, time, document ID etc) somewhere, so if there's any trouble, you can have evidence on who did what and when.
When the file size grows, you can do a backup and then trim your file:
blank field prnfile for printdate
pack memo && you need to open exclusive for this