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.
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
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
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
Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
http://www.kenhamady.com/