Hi there,
I have a report set up to list out certain transactions for the day. I have it scheduled to run each evening for that day, using the "=Today()" for the date. This date also prints on the report. The report is ran and emailed to the user each evening. When he opens the report the next morning, the date printed on the report is the date he opens the report, but the data is for the previous day when the report was run. (He does not have any Jet functionality) Is there a function other than "=Today()" that can be used to run the report for that day and then print that date on the report without it changing to the date the report is opened?
Thanks!
Pat Rounds
2 comments
-
Jet Reports Historic Posts Hi Pat,
Have a closer look at the NP("Eval") function in the Help of PDF document.=NP("Eval";"=TODAY()") -
Jet Reports Historic Posts I've personally found dates to be the most difficult part of the reporting process. Ideally I want to build a report once that can run for ever without having to be modified, and without being so over complicated it takes me days to re-learn what I've done when it needs updates.
For example, most of our reporting is done at the 'End of Month'. As a beginner (starting in the early part of the calendar year) I was find with using the np("eval","=today()") function to build my date filters. Then reports started running into the 1st of the month (too many to run between COB on the 31st and 11:59 on the 31st). So then these functions starting using invalid date ranges. Then I thought about the end of year change over. When I did some testing, some of my older reports would come up with date ranges like 01/01/09..31/12/08 (don't ask me how).
I guess what I'm saying is have a long and hard think about how and when your reports are going to be run, and develop some 'standards' for how you write them. Here are mine for example:
(1) All reports run on the next day after the time period in question
- i.e. a report for Tuesday runs on Wednesday morning (00:00 onwards), and a 'end of month' report always goes up until the end of the previous month, i.e. Novembers report will run on Dec 1st.
(2) Build on the np("eval","=today()") function - I created a 'work date'.
- For example, an end of month report that runs on the 1st could use day - 1 as a formula, however what happens if you want to run it on the 2nd, or 3rd, or half way through for some reason. I create a work date that presumes (1) and is always the last day of the period in question, so the work date for any End of month report run in December is always Nov 30th. I've found using date(yyyy,mm,0) a great way for getting the last day of the previous month, with the yyyy and mm refering to the np("eval") function.
(3) For all reports that report for a time period for end of year, determine what needs to be shown in Jan - generally speaking 'year to date' reports run in Jan are really interested in the previous calendar year (but not always).
I'd be interested to see what others are doing to manage their dates.
cheers, Mark