×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ModificationDate changes when using Active-X control

ModificationDate changes when using Active-X control

ModificationDate changes when using Active-X control

(OP)
Greetings,

I am building a collection of v8.5 reports which will used within a VB6 program with the Active-X viewer control.  I want a tagline at the bottom of the reports with the name and modification date, so our support techs can determine if a customer has modified a report when they call in for help with it.  The current formula I have is as follows:

  dim File as string
  dim Slash, Rpt as number

  File = Ucase(Filename)
  Slash = InStrRev (File,"\")
  Rpt =  InStrRev (File,".RPT")
  File = Mid(File,Slash + 1, Rpt - Slash - 1)

  formula = " Form: " & File & "-" & ReportTitle & " Report   Revision: " & ToText (ModificationDate, "M/dd/yy")

This works fine when viewing the report in the Crystal Designer environment.  The problem is that the Active-X control replaces a couple formulas to pass in option settings.  When it is viewed, ModificationDate returns the current date instead of the Last Modified date of the source file.  Is there a way to get this information somewhere else?  Alternatively, can any of the summary statistics such as Total Editing Time or Revision Number be accessed either within a Crystal formula, or by VB in the report object?  They would serve the same purpose if displayed.


RE: ModificationDate changes when using Active-X control

As you have discovered, the modification date is not based only on when the files was modified and SAVED, but also includes any modifications made while the report was open.

If you pass a parameter, instead of modifying a formula, you might get the mod date to do what you want.

Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
http://www.kenhamady.com/

RE: ModificationDate changes when using Active-X control

(OP)
I found a workaround.  Since I am calling the report from VB, I just looked up the file modified date and passed it in as a string formula.

I would still like to find a way to access the total editing time and number of saves though.

RE: ModificationDate changes when using Active-X control

I don't know of a way, but I have never looked, either.

Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
http://www.kenhamady.com/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close