views:

35

answers:

1

I have a Crystal 2008 report hitting a SQL Server 2008 database using a stored procedure. The stored procedure takes a parameter of type Date (new to SQL Server 2008).

When Crystal automatically creates the parameter for me in the report, it makes the parameter a type of String. I don't want a type of String because then the user is required to type in a date and doesn't see the Crystal date dialog that he/she would see if the parameter type is Date. The problem is that Crystal is not allowing me to change the parameter type to the type I want.

I don't want to change the stored procedure parameter to a dateTime type because then Crystal would create a report parameter type of datetime and the user would be required to enter a time value. I don't want this either.

Do I have any options here?

A: 

One possibility might be to report from the procedure with datetime parameters in a subreport, create date-only parameters in the main report and link the date-only parameters in the main report with the datetime parameters in the subreport.

Crystal 10 (which I use) won't allow linking date-only to datetime parameters, but Crystal 2008 might - if not, create formulas in the main report to convert the date-only parameters to datetime (with time as midnight) values.

Mark Bannister