Crystal Reports 2008 - Problem with Parameter Type

試著忘記壹切 提交于 2020-01-06 07:12:19

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/3534498/crystal-reports-2008-problem-with-parameter-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!