Solved

Crystal Reports XI date prompts

Posted on 2010-09-22
3
850 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

910 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

24 Experts available now in Live!

Get 1:1 Help Now