Solved

Print Time formula

Posted on 2006-10-30
8
263 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now