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
Solved

Format data in a Parameter

Posted on 2007-12-06
5
435 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
ID: 20425614
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
ID: 20426915
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
ID: 31413286
I was able to figure it out with your suggestion.  Thanks for your help.
0
 
LVL 3

Expert Comment

by:randomjames
ID: 20428122
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
ID: 20428146
I got it to work using the date in the parameter but we are using DB2.  

Thanks for the help.

Montrof
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

829 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