Solved

Crystal Reports XI date prompts

Posted on 2010-09-22
3
855 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
PCIIain earned 125 total points
ID: 33742132
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
ID: 33743801
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
ID: 33748245
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

752 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