Skip to Content
Former Member
Dec 10, 2008 at 08:55 PM

How to specify for datetime parameter not to use time part - ASP.Net


It seems to be a very old question which was never answered.

I can do almost everything with parameters except change what entry format is used for datetime parameter prompt (SQL Stored Procedure inherited parameter, therefore is not adjustable in the report designer).

I am using CrystalReportViewer control in C#/ASP.Net to display report.

It would be very inconvinient to go over 100+ reports and associated Stored Procedures and adjust all necessary datetime paramaters to be just date (SQL Server 2008). Also even though I can create custom parameter entry screen, I rather not do that.

Is there any hack/option/mod which would allow me specify that for datetime parameter in the report use date only when user is requested to provide a new value.

I can change report parameter list in CrystalReportViewer and adjust datetime to be date parameter in code (OnInit or other events), but it seems to be ignored by the page render engine.

I cannot change parameter on reportDocument level (at least I did not find proper way of doing it).