Welcome! Log In Create A New Profile

Advanced

Archive Reports/Documents

Posted by George 
George
Archive Reports/Documents
March 10, 2009 07:59PM
Am a Clarion user currently, experimenting with WinDev as an alternative. One issue for our applications is the ability to archive reports/documents, tagged to master records within our database. Does not appear to be a feature in WinDev. Has anyone developed a way to handle this function? Thanks - G



Edited 1 time(s). Last edit at 03/10/2009 08:18PM by Jimbo.
Al
Re: Archive Reports/Documents
March 10, 2009 09:49PM
Hello George

The directory functions in Windev are very easy to use and full featured, as is the external file handling so what you are asking is quite easy to code
We have a document attachment process in our software and as a document is attached to a main record we hold its name & directory in a file so to archive the files we go through the file and copy the documents to another drive

If fFileExist(filename) //check the source file
fCopyFile(FileName, NewFilename,Frconfirm) //copy and confirm that it was copied

This code will search recursively for all the files in a folder and sub folders
LFileList = fListFile(LSrchDir,frRecursive)
// For each file found
FOR EACH STRING LFileName OF LFileList SEPARATED BY CR
LSrchFileName = ExtractString(LFileName,1,"\",FromEnd)

You can then decide what to do with the file name returned

If you have the demo copy of Windev, the commands that work with external files are all prefixed with lowercase "f"

Regards
Al
George
Re: Archive Reports/Documents
March 10, 2009 10:18PM
Thanks Al - I will give it a try. - George
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: