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
Solved

Print Time formula

Posted on 2006-10-30
8
291 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
8 Comments
 
LVL 100

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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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 34

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 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