Solved

Print Time formula

Posted on 2006-10-30
8
304 Views
Last Modified: 2008-02-01
Can you make it where if the print time(time) was more than 5 hours ago it would say not up to date?
0
Comment
Question by:ThomasBallardIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 17836139
I don't think so because it is up to date when you print it.

What are you trying to do?

mlmcc
0
 
LVL 3

Author Comment

by:ThomasBallardIT
ID: 17836240
If I make the report on monday and save it and then open it up on wednesday the info is no longer up to date.  I guess I just have to refresh it?
0
 
LVL 42

Expert Comment

by:frodoman
ID: 17836424
Yes, if you save it then all of the data will be saved as well - including any formula that you might use to compare dates.

The only workaround I can think of is if you return a date field from your stored procedure you could display that date on your report so you'd at least know how old the data is.  It probably isn't an automated solution like you're looking for but it might work for you.

0
[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

 
LVL 17

Expert Comment

by:MIKE
ID: 17837342
Can you use a MAX({yourtable.yourfield}) somewhere in the HEADER of the report that will tell you the MAX DATE for the data?

MikeV
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17837344
Maximum({yourtable.datefield})


0
 
LVL 42

Expert Comment

by:frodoman
ID: 17837455
Mike's solution will work assuming the data always includes the date that the report was run.  Not knowing what you're looking at, I wasn't sure if this would necessarily be the case - if it is, then use his approach.

frodoman
0
 
LVL 35

Accepted Solution

by:
James0628 earned 125 total points
ID: 17839015
Instead of the print date/time, how about the data date/time?  If you save the report with data, the data date/time should reflect when the saved data was read.  Then you can compare that to the current date/time.  For example, you could put a formula like the following in the page heading:

if DateDiff ("n", DateTime (DataDate, DataTime), CurrentDateTime) > 300 then
  "Not up to date"

 I used "n" to get the difference in minutes instead of hours to get a more precise result.  If you use "h" for hours, anything from 5 to just under 6 hours would come back as 5 hours.

 James
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17842086
Thomas,

Just curious did this work? I've seen issue with the DATA DATE field in the past. Let us know.

Thanks
MikeV
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question