?
Solved

Format data in a Parameter

Posted on 2007-12-06
5
Medium Priority
?
438 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
[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
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
randomjames earned 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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. …
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 …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

764 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