Skip to Content
author's profile photo Former Member
Former Member

DatePicker instead of DateTimePicker

Hi experts,

I need to use DatePicker at Paramter Fields. If I use it as datetime in sproc code, DatTimePicker comes up at Parameter Fields of Crystal Reports. But I would like to use it as date. If I change @startdate as datetime to @startdate as date, DateTimePicker icon is gone. How can I solve this problme?




-- Add the parameters for the stored procedure here


@startdate as datetime,

@enddate as datetime,

@loc int




Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Dec 14, 2011 at 07:32 PM

    Hi David,

    Here's how you can do it:

    1) Create a date parameter in the Main report

    2) Create a formula as follows:


    3) Insert a subreport and choose the stored proc to be the datasource of this report

    4) Right-click the subreport and select Change Subreport Links

    5) Move the formula we created to the 'Fields to link to' area and in the drop-down on the bottom-left select the datetime parameter from the subreport

    When you refresh the report, the prompt would show a date parameter instead of the datetime parameter.

    Hope this helps!


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.