9 Replies Latest reply: Sep 2, 2010 11:17 AM by Chris Hopkins RSS

    Help with Date input

    Chris Hopkins

      Hi

      I am building a TRANSACTION MODULE which will display ALL transactions that have taken place in our retail stores.

      I want the end user to be able to search through transactions between a chosen date range.

      E.g.

      The end user will enter a START date and END date, then the application will show all transactions between those dates.

      The only way i can find to do this is to add SEARCH boxes, so the user can enter directly into them the dates required

      My problems are :

      If i add 2 search boxes (1 for START date and 1 for END date), and i input a START date, then when i input an END date my start date is erased and only results for my end date is displayed.

      Is there a way of keeping my START date selection? and also...

      after i input a START or END date, the date is selected, but my search box goes back to SEARCH. Is there a way of keeping the date i have entered displayed in the search boxs until i clear my selections? Or is there another way of the end user to key in start and end dates?

      Any help will be appreciated.

      Thanks

        • Help with Date input
          haneesh iqbal noormohammed

          Create two separate tables with the date field like [Start Date] and [End Date]

          Add two calendar object in the report and map them to [Start Date] and [End Date]

          Create two variables 'vStartDate' and 'vEndDate' with the following definitions:

          vStartDate = GetFieldSelections([Start Date])
          vEndDate = GetFieldSelections([End Date])


          We should now use these variables in expression to pass the date range to get the transactions between the date range. The expression will be as follows:

          =SUM({<[Trans Date]={">=$(vStartDate)<=$(vEndDate)"}>}Sales)

          Assuming [Trans Date] is your date field. This expression will give the value for sales for the dates entered in the two calendar objects which we created.

          Hope this resolves your issue.

          -Haneesh

          • Help with Date input
            kerem pekçabuk

             

            Hi,

            I made a sample application about this in my project.I use the steps below.

             

             

            1. I create two time tables.StartTimeTable and EndTimeTable.Those two tables don't have any joins with other tables and with each other.
            2. I create two calenders which uses StartTimeTable.Date and EndTimeTable.Date.
            3. Under those two calenders i put a button named "Select Date".I put an "select field" action.In select field action,selection field is RelatedDate. Search string is {">= $(StartTimeTable.Date) <=$(EndTimeTable.Date)"}

            After selecting two dates and pressing the button the times will selected as you want.