Solved

Format data in a Parameter

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
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 give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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