如何使用水晶报告在两个日期范围之间显示报告,包括无交易日期 [英] How do I display reports between two date range including no transaction dates using crystal report

查看:116
本文介绍了如何使用水晶报告在两个日期范围之间显示报告,包括无交易日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的MySql数据库中,我的交易日期为2017-09-08,2017-09-09和2017-09-11。然后我想使用datetimepicker1和datetimepicker2显示日期范围之间的记录。假设datetimepicker1的值为2017-09-07,datetimepicker2的值为2017-09-13。所以这样输出:



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.





我尝试过:



我不知道怎么做。第一次在Crystal报告中。



What I have tried:

I don't have any idea how to do this. 1st time in Crystal report.

推荐答案

编写如下程序

1.传递fromdate和todate作为参数

2.创建一个包含字段的临时表:交易日期和交易详情

3.填写临时表的交易日期,日期和日期之间的日期为

4 。用事务详细信息更新临时表

5.如果事务详细信息为空,则更新临时表,并且此日期没有事务

6.返回此结果集并显示直接在水晶报告中
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


这篇关于如何使用水晶报告在两个日期范围之间显示报告,包括无交易日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆