Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report Output (A2002)

    Hello All,
    In my project, I have some code that runs a report and creates a PDF and stores it on the server HD. If the record is updated, the report is run again, overwriting the original report. What I would like to do is either rename the original file (so that it is not overwritten), or name the new file something slightly different so that there are two or more copies. I use the "DIR" command to check to see if the original file is there....... Anybody have any suggestions on a good way to handle this?

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Output (A2002)

    It's probably easiest to rename the old file using

    Name "old_path_and_name" As "new_path_and_name"

    Do you want to keep one older version? If so, you can use a fixed name.
    Or do you want to keep an unlimited number of older versions? If so, you should use a sequence number in the name.

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Output (A2002)

    Thanks Hans,
    You can delete that other post you locked if you want.....

    How would you suggest using a sequence number for multiple copies?

    Thanks,
    Mark

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Output (A2002)

    You could adapt the code in <post#=336312>post 336312</post#> to your purposes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •