Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Hi,
I made a sample application about this in my project.I use the steps below.
After selecting two dates and pressing the button the times will selected as you want.
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
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
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
Hi,
I attached modified application herewith find it.
Regards
Ashish Srivastava
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
The value is decimal because the feild i have used in the Calender control is of the Datetime format.
Hi Karem, Do you have a sample you could post please?