Solved

Crystal Reports UK/US Date Formatting

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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 …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
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…

790 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