Solved

Crystal Reports UK/US Date Formatting

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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. …
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now