Solved

Format data in a Parameter

Posted on 2007-12-06
5
436 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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…

730 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