Datetime Parameter on Sql Stored Procedure-Masking the time portion on Crystal Side

Posted on 2005-05-10
Last Modified: 2008-03-10

We want a calendar pop up on the  Crystal side.  However we want to hide the time portion of the calendar.  

We are dealing with stored procedures and the feed will have to be datetime.

How can we be creative about this?

Thank you,
Question by:Lucia
    LVL 10

    Expert Comment

    Right click on the DateTime field -> Format -> DateTime tab -> Then choose whatever format you desire or you can customise you format.

    LVL 13

    Accepted Solution

    Here are (some of) your options:

    1) Instead of using a SMALLDATETIME or DATETIME parameter, change it to a VARCHAR, and convert it back to DATETIME in the procedure.  The downside of this, is that your users need to type in the dates in valid date format, or the procedure might blow up.

    2) Tell the users to ignore the Time portion, and handle the Time part within the procedure definition.

    3) Create a blank report, and add in your existing report as a subreport.  In the 'new' report, define a parameter that is a Date datatype.  Create a formula that converts the parameter field to a DateTime result, then use the formula field as the 'link' between the main and subreport.

    I usually go the option 2 route, but any of them will work.


    Author Comment

    Hi :

    Thank you all for your responses.

    I think we have also decided to goto option 2.

    LVL 13

    Expert Comment

    Glad to help.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now