February 14, 200124 yr I am trying to create a report where the user can click a button and bring up a report of all newly created records within the past 7 days. The only thing I need to know is how to find the correct date range. The range should read: TodaysDate - 7 days to TodaysDate (or >TodaysDate - 7 days. In FM 3 how does this work? (//-7)..// doesn't do the trick. Can this be done? Thanks.
February 14, 200124 yr I do it by having a calculated field to show the days since the record was created (or in my case since a particular check was carried out). The calculation is simply: Today - Creation Date You can then find all records with a value >7 in the Days Since Created field
February 14, 200124 yr John- If you do the search in the way you explain, won't you have a very long search (especially in a database with a lot of files)? By making the calculation based on the days elapsed field, the search is happening on an unindexable field. If the database had to index the field everytime the report is run, it would probably be very tedious. Why not just promt the user for the date you want to start from & then have the script find the desired date range? Just a thought... Later :-)
February 15, 200124 yr Good point but I checked and the field and is indexed! It takes less than 4 seconds using a PC with a 133mHz processor and with a database containing 2300 records. I actually use this field for other purposes as well.
Create an account or sign in to comment