简体   繁体   English

SQL Server 2000和Crystal报表中的日期变量

[英]Date variable in SQL server 2000 and crystal report

Due to the constraints I have now, i am still using SQL server 2000 the problem is the client wants a report which should retrieve date variables (namely date_from and Date_to). 由于我现在遇到的限制,我仍在使用SQL Server 2000,问题是客户端需要一个应检索日期变量(即date_from和Date_to)的报表。 the date should only consider the date part in crystal reports 日期只应考虑水晶报表中的日期部分

水晶报表的一部分

So the question here is, how can i make the crystal report, accept only the date part and not the time part. 所以这里的问题是,我如何制作水晶报表,仅接受日期部分而不接受时间部分。

EDIT: these are parameters, i need a data type that would accept only the date. 编辑:这些是参数,我需要仅接受日期的数据类型。 and i am using SQL SERVER 2000. if i have to create a data type, how? 并且我正在使用SQL SERVER2000。如果必须创建数据类型,该怎么办?

EDIT: @AndrewLazarus sorry sir for the late reply. 编辑:@AndrewLazarus对不起,先生,您的回复很晚。 i would like to have my variable of the crystal report to accept the date only sir. 我想让我的水晶报表变量只接受日期,先生。 i am really sorry for the confusion. 我真的很抱歉感到困惑。 to show you what i mean, i would like to have somewhat something like this 告诉你我的意思,我想有这样的东西

在此处输入图片说明

i somewhat cut the picture from my screenshot above but i hope it may give you a picture 我从上面的屏幕截图中剪了一些图片,但我希望它可以给您一张图片

you can compare in report selection formula 您可以在报告选择公式中进行比较

http://publib.boulder.ibm.com/infocenter/radhelp/v7r5/index.jsp?topic=%2Fcom.businessobjects.integration.eclipse.designer.doc%2Fhtml%2Ftopic683.html http://publib.boulder.ibm.com/infocenter/radhelp/v7r5/index.jsp?topic=%2Fcom.businessobjects.integration.eclipse.designer.doc%2Fhtml%2Ftopic683.html

http://customerfx.com/pages/reporting/2009/11/19/working-with-the-datepart-function-in-crystal.aspx http://customerfx.com/pages/reporting/2009/11/19/working-with-the-datepart-function-in-crystal.aspx

or 要么

you can define string parameter variable rather than date in sp in sqlserver (easy to manage in sqlserver) and pass datepart value to sqlserver from your code or in preview. 您可以在sqlserver中的sp中定义字符串参数变量而不是日期(在sqlserver中易于管理),然后从代码或预览中将datepart值传递给sqlserver。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM