Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help with Date input

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

9 Replies
Not applicable

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

Not applicable

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.



Not applicable

Hi,

Instant of making variable you make calender object from_date,To_date.

I have attached sample application herewith kindly find it.

Regards

Ashish Srivastava

Not applicable

Hi Ashish,

I am tried your application and i got a problem if i am choosing the To Date less than the From Date it is showing some values. Is there any option to restrict this ?????

Regards,XXX

Not applicable

Try adding a calculation condition in the chart properties such that the from date should be always less than to date and add a corresponding message like 'From date should be lesser than to date'

Ex. if(from_date < To_Date, true(),false())

So, the calculation will be done only when the above condition is satisfied

-Haneesh

Not applicable

Hi,

I attached modified application herewith find it.

Regards

Ashish Srivastava

Not applicable

Thanks For your response Ashish,

=if(From < To, sum({<ATIME={">=$(From)<=$(To)"}>} CID),0) .

I trying based on the below steps

ATIME field is in the Datetimeformat. And the From and To condition are from the same ATIME Feild.

Issue is i am getting as numbers(from with decimal value and To as Number ) as selected values inplace of dates.Where as the From and To are based on the same feild ATIME, then why from is decimal and To is number even if i am choosing the same dates.



=if(From < To, sum({<ATIME={">=$(From)<=$(To)"}>} CID),0) .

Moreover i am not getting output.For what ever selection i am getting blank table.

Regards,XXX

Not applicable

The value is decimal because the feild i have used in the Calender control is of the Datetime format.

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi Karem, Do you have a sample you could post please?