如何解决这个问题水晶报告记录选择公式 [英] How to solve this problem crystal report record selection formula

查看:41
本文介绍了如何解决这个问题水晶报告记录选择公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



Hello guys,

I need some help regarding creating record selection formulas:




i went to fetch data from two tables with Crystal Report Record Selection Formula between two dates





这个是我的代码。



{Table1.TYPE} ='ABC'和{Table2.TYPE} ='ABC'和{Table1.DATE}的日期(' + DTPStart.Value.date +')或('+ DTPEnd.Value.date +')和{Table2.DATE} in date('+ DTPStart.Value.date +')或('+ DTPEnd.Value.date +')



我尝试过:





This is my code.

{Table1.TYPE} = 'ABC' and {Table2.TYPE} ='ABC' AND {Table1.DATE} in date('" + DTPStart.Value.date + "') or ('" + DTPEnd.Value.date + "') AND {Table2.DATE} in date('" + DTPStart.Value.date + "') or ('" + DTPEnd.Value.date+ "')

What I have tried:

Crystal Report Record Selection Formula between two dates

推荐答案

日期范围的正确公式是(a' ka BETWEEN ... AND ... ):

A proper formula for date range is (a'ka BETWEEN ... AND ...):
{DateField} in {#?Fromdate#} to {#?ToDate#}
'or
{DateField} >= {#?Fromdate#} AND {DateField} <= {#?ToDate#}



至于你的例子:


As to your example:

{Table1.DATE} in #" + DTPStart.Value.date + "# to #" + DTPEnd.Value.date + "#
'or
{Table1.DATE} > date(#" + DTPStart.Value.date + "#) AND {Table1.DATE} <= date(#" + DTPEnd.Value.date + "#)


这篇关于如何解决这个问题水晶报告记录选择公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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