Search code examples
sqlsql-servercrystal-reportssql-server-2000

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). the date should only consider the date part in crystal reports

Part of Crystal report

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?

EDIT: @AndrewLazarus sorry sir for the late reply. 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

enter image description here

i somewhat cut the picture from my screenshot above but i hope it may give you a picture


Solution

  • 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://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.