Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
In my MySql Database I had a transaction of the date 2017-09-08, 2017-09-10 and 2017-09-11. Then I want to display records between to date range using datetimepicker1 and datetimepicker2. Assuming that datetimepicker1 value 2017-09-07 and datetimepicker2 value 2017-09-13.So the out put like this:

2017-09-07 no transaction of this date.

2017-09-08 showing here the transaction.

2017-09-09 no transaction of this date. 

2017-09-10 showing here the transaction.

2017-09-11 showing here the transaction.

2017-09-12 no transaction of this date.

2017-09-13 no transaction of this date.


What I have tried:

I don't have any idea how to do this. 1st time in Crystal report.
Posted
Updated 15-Oct-17 3:38am
v2

1 solution

Write a procedure as below
1. pass fromdate and todate as parameters
2. create a temporary table with fields : transaction date and transaction details
3. populate transaction date of the temporary table with dates between date from and date to
4. update the temporary table with transaction details
5. update temporary table with 'no transaction on this date' if transaction detail is null
6. return this result set and display directly in crystal report
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900