3 Replies Latest reply on Oct 18, 2012 11:32 AM by philmodjunk

    Report based on records that match todays date...

    heath

      Title

      Report based on records that match todays date...

      Post

           Hello -

           I have a database that keeps track of field experiments. As samples come in they are assigned a unique number and entered into the database. Samples are then tested a later dates and the results are again entered into the database for each experiment. I have a self-related portal that I use to display the experiments that are due based on a match to the current days date. Works great! However, I need to print this data in a report or form that would allow the technician to see only today’s tests that are due. Is there a simple way, say in reports, to accomplish this?  I tried to setup a report, but I don't understand how to tell it I only want the records that are due on today’s date. I have a field called C_Date that is the calculated date that the experiment is due on. I need to tell the report to display only records that match that date. Can anyone please give me a suggestion as to how to achieve this.

           Thanks in advance,

           Greg

            

        • 1. Re: Report based on records that match todays date...
          philmodjunk

               Use a script like this:

               Enter FInd Mode []---->Clear the Pause check box
               Set Field [YourTable::C_Date ; Get ( CurrentDate ) ]
               Set Error Capture [on] ---> keeps "no records found" dialog from appearing if no records are found
               Perform Find []

               This will find all records in YourTable where C_Date contains today's date.

          • 2. Re: Report based on records that match todays date...
            heath

                 Thank you so much Phil...That worked perfect.  I have one little change.  What I need is to also include records that have been missed and are overdue.  How would I go about telling it to not only find todays date, but also any previous date that has not had a result entered into the field called C_Result.  If Statement?

                  

                 Thanks again,

                  

                 Greg

                  

            • 3. Re: Report based on records that match todays date...
              philmodjunk

                   Enter FInd Mode []---->Clear the Pause check box
                   Set Field [YourTable::C_Date ; Get ( CurrentDate ) ]
                   New Record/Request
                   Set Field [YourTable::C_Result ; "=" ]
                   Set Error Capture [on] ---> keeps "no records found" dialog from appearing if no records are found
                   Perform Find []

                   This finds all records that have today's date OR that have an empty C_Result field.