Solved

Crystal Reports XI date prompts

Posted on 2010-09-22
3
848 Views
Last Modified: 2012-05-10
I have created a report using Crystal Reports XI.  
It selects records from a Progress OE10 database based on a date field.
If I build the selection within the report I can select the date in month, day, year format.
What I mean is within the Selection Expert I select the field, select Is Greater Than, then enter the date as 08/01/10.
When I look at the formula it shows this:  {PV_SOrder1.SOrderDate} > Date (2010, 08, 01)

I want to change this to a prompt for the user so I created a prompt field called OpenDate and set the type as date.
The selectiion  forumula now looks like this:  {PV_SOrder1.SOrderDate} > {?OpenDate}

The problem is the prompt requires me to either select the date from a calendar or enter it as yyyy-mm-dd.
I want to enter it as mm/dd/yy.  I did not have this problem in previous verions of Crystal Reports.
Is there a way to accomplish this?
0
Comment
Question by:Suz_KC
3 Comments
 
LVL 13

Accepted Solution

by:
PCIIain earned 125 total points
Comment Utility
I think the answer to this is 'Depends how you want to approach it'.

You can prompt for a string parameter, and parse this in a formula to get the date yourself. (Has the advantage that you can accept empty parameters to give  a default value.)


Alternatively the date picker is defined as a javascript in
C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\prompting\js
and I believe that if you went through this, you could rewrite it to prompt for and parse out in a different style.

Finally, you could write a VB viewer and prompt for the parameters yourself, allowing you to choose the style of the date input from VB.
0
 
LVL 19

Assisted Solution

by:GJParker
GJParker earned 125 total points
Comment Utility
1.  Make your parameter date (?Date1) a Text field, and specify that it is input as 'mm/dd/yyyy'
2.  Create a formula field (@Date2) that converts the text date (?Date1) to Date format:
         cdate ({?Date1})

This way you will ose the date picker though
0
 

Author Closing Comment

by:Suz_KC
Comment Utility
Thank you.  Technically your answers work; however, I must be dealing with picky users.
In CR X when they were prompted they had the option of entering the date in the format of mm/dd/yy or clicking on the calender.  In CR XI the date format is only yyyy/mm/dd or they can still click on the calendar.

If I follow your suggestion of changing the prompt to a string, the calendar selection goes away as an option.  The other suggestions of changing the java scrip and creating VB code worry because of future upgrades and compatibility with other applications.

I just wish Crystal Reports had an option you could set for the format of the selection date the same way they have for the way a date displays in reports.

Thanks for your help.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

9 Experts available now in Live!

Get 1:1 Help Now