Solved

Format data in a Parameter

Posted on 2007-12-06
5
430 Views
Last Modified: 2010-04-21
Dates in the database are stored as numbers, such that a date of 12/07/2007 is stored as 20071207 and in crystal shows as 20,071,207. We would like to use a date field in a parameter but want to display as mm/dd/yyyy.  We can manipulate the field with a formula field to desired format, but this field is not an allowed option in the value drop down on parameter settings.  In essence, can you apply a function to a parameterized value?  If not, what is the work around to this?  
 

0
Comment
Question by:montrof
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
randomjames earned 500 total points
Comment Utility
I'm a little unclear why you would use a drop-down list of values for your dates instead of using the calendar or just having a text field where people type the date.

If you are getting your parameters drop-down list from your data set you could format the data with SQL as a Command data source. You could parse and convert the string to a date in the SQL select and then all your report would see is an actual date.
0
 
LVL 1

Author Comment

by:montrof
Comment Utility
I am fairly new to Crystal reports how do you use the calender function or make it so they input a text into a mask.
0
 
LVL 1

Author Closing Comment

by:montrof
Comment Utility
I was able to figure it out with your suggestion.  Thanks for your help.
0
 
LVL 3

Expert Comment

by:randomjames
Comment Utility
When you make your parameter field you can set it's data type and you can select datetime . When you do and when you run the report you will be prompted with a datetime control which includes a calendar and time fields.

Are you decent with SQL? If not, post your table structures and I can help with the command. Also, what kind of database are you using? Oracle? SQL Server? Something else?
0
 
LVL 1

Author Comment

by:montrof
Comment Utility
I got it to work using the date in the parameter but we are using DB2.  

Thanks for the help.

Montrof
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

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…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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