March 18, 201312 yr I am trying to build a data base for a local non-prof. They rescue cats and kittens, and try to place them in good homes. The application will track the intake and discharge of each animal. As part of this they want a quarterly report of how many animals came in, went out, were spayed or neutered, etc. I have figured how to gather the data and display it, but have run into a roadblock on the report. I cannot see what to do when the end of a year occurs. I have scritpted the 1st, 2nd and 3rd quarterly reports, but not the year end. Obviously the final data for a year cannot be entered until the last entries are known, in January of the following year. I can generate the report if I force the user to enter the search dates (1/1/YY...12/31/YY) but that is not what I would like to do. At the most, I would like them to enter the year, and then run a script to generate the report. What I need is a find script step that will cover the period 1/1/previous year...12/31/previous year. Can anyone tell me how to do this?
March 19, 201312 yr Enter Find Mode Set Field[ <yourDateField>; Date(1; 1; Year(Get(CurrentDate)) - 1) & "..." & Date(12; 31; Year(Get(CurrentDate)) - 1)] Perform Find If you want the user to be able to report any year, add a global field g.YearToReport, and change Year(Get(CurrentDate)) - 1 to g.YearToReport in the script step above.
March 19, 201312 yr Solution Or even find on just Year ( Get ( Current Date ) ) - 1 Entering just four digits into a date field is interpreted as requesting calendar year. So user could enter year into custom dialog even
Create an account or sign in to comment