Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ModificationDate changes when using Active-X control

Status
Not open for further replies.

ScottGS

Programmer
Aug 2, 2001
27
0
0
US
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.


 
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
 
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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top