Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Parameter

Status
Not open for further replies.

Jyme

MIS
Apr 28, 2004
29
US
I have a report that runs off of a stored procedure. One of the stored procedure parameters is a datatype of datetime. The crystal report parameter to link to the stored procedure parameter is by default set to a datetime parameter. Is there any way to change the crystal report so that I can use just the date instead of both date and time for my crystal report parameter?

thanks
 
'fraid not. Tell your users to ignore the Time portion of the parameter, then deal with it in your stored procedure.

If that's unacceptable, a goofy workaround would be to create a blank report with a Date parameter, then add your report as a subreport. Create a formula in the 'Main' report to convert the Date parameter a DateTime, then link it to the subreport.

-dave
 
In addition to Dave's suggestions, another approach is to use a STRING parameter and CAST/CONVERT it in the SP.

I assume that you're using SQL Server, hence you don't have a DATE type available. If it's a database that supports a DATE type, expose the parm as a date only.

You're generally better served to include the software/database being used in posts.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top