2 Replies Latest reply on Aug 25, 2010 6:04 PM by LaRetta_1

    final order date script help



      final order date script help


      I have a database with customers and their orders. One field is order date. I need a script to put in a new report which will display each customer with their most recent order date.

        • 1. Re: final order date script help

          That's not much to go on. We need to know the structure of your data in order to suggest a solution.

          Please Help Us to Help You...

          • 2. Re: final order date script help

            There are a few methods:

            1) In Customers, create a calculation (result is date) with: Max ( OrderDate )

            2) If the Order date is the creation date (or at least always the latest order is the most current), then you can also use calculation of Last (OrderDate). 

            3) Create another table occurrence of your orders table and attach it to your Customer table by CustomerID.  Sort the relationship in descending order of Order Date then simply place your Orders::Order date directly on your Customer layout.

            4) Create a one-row portal of your base relationship to Orders on your Customer layout.  Only place Orders::OrderDate within it.  Make portal small enough to only hold that order date.  Sort the portal in descending order on OrderDate.

            I would suggest item 4.  In all instances, be sure to disallow entry so Users can't accidently change that OrderDate.