Solved

Crystal Reports UK/US Date Formatting

Posted on 2012-04-05
2
255 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
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 34

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal Reports - Display Last Invoice in Group 15 69
Crystal Reports Sum only working when drilling down 20 54
Pull date to Group header 6 30
free Crystal Report viewer 4 20
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 …
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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