We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Print Time formula

ThomasBallardIT
on
Medium Priority
326 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?
Comment
Watch Question

Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
I don't think so because it is up to date when you print it.

What are you trying to do?

mlmcc

Author

Commented:
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?

Commented:
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.

MIKESoftware Solutions Consultant
CERTIFIED EXPERT
Top Expert 2006

Commented:
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
MIKESoftware Solutions Consultant
CERTIFIED EXPERT
Top Expert 2006

Commented:
Maximum({yourtable.datefield})


Commented:
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
CERTIFIED EXPERT
Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
MIKESoftware Solutions Consultant
CERTIFIED EXPERT
Top Expert 2006

Commented:
Thomas,

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

Thanks
MikeV
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.