Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Reports XI date prompts

Posted on 2010-09-22
3
Medium Priority
?
859 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 500 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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 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