Solved

Crystal Reports UK/US Date Formatting

Posted on 2012-04-05
2
264 Views
Last Modified: 2012-08-14
One of our UK clients has asked for currency and date formats (UK format) on their reports. Crystal Reports 9 and we literally have dozens of reports we'd need to change.

We need to maintain the option to display the US date format on all reports but won't consider maintaining two different versions of each report.

Can formulas be used in Crystal 9 to format a date field - based on a db value passed to the report or otherwise?
0
Comment
Question by:neekolzun
[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
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 37814693
Sure.

Try this

Right click the field
Click FORMAT FIELD
Select the NUMBER TAB
Click CUSTOMIZE
Clcik the CURRENCY SYMBOL tab
Click the formula butoon to the right of Currency Symbol
Enter a formula like

if {?Country} = "England" then
   chr(ASCII for pound or euro symbol)
Else
   "$"

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 37815200
I haven't use CR 9, but CR 10 has "System Default" format options for numeric and date fields.  If CR 9 has them, they might be worth a look.  Otherwise, you can probably handle it using formatting formulas, as in mlmcc's example.  For a date field, open the format window, select the "Date and Time" tab, click Customize, select the Date tab, and click the formula (X+2) button under Order.  Your formula needs to produce 0 for YMD, 1 for DMY, or 2 for MDY, so it might be something like:

if {country} = "UK" then
  1  // DMY
else
  2  // MDY


 I'm using CR 10.  Hopefully CR 9 has the same options.

 If you want to apply the same formatting to several fields on a report, you can select all of the fields (hold Control or Shift and click, or drag a box around them, or right-click on a section name and "select all section objects"), and then right-click and select "Format Objects" and format all of them at once.

 James
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. …
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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