Solved

crystal report formula - crShortMonth

Posted on 2013-01-08
5
537 Views
Last Modified: 2013-01-16
Hello Experts
I am trying to customise the date in the report to appear in the german format

DD. MON YYYY

ex: 1. Jan 2013

I am using the crShortMonth to show the short month.

The question I have here how can I check if the month is Mar then show it as "Mär"

 Please adivse

Thanks
0
Comment
Question by:newbie27
5 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 38755773
Are you saying you want to produce german output when you on a machine that has non-german regional settings?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 38757316
What version of Crystal?

You may need to either change the regional settings to be German or use a German edition of Crystal.

mlmcc
0
 
LVL 8

Author Comment

by:newbie27
ID: 38762632
Hi

>> Are you saying you want to produce german output when you on a machine that has non-german regional settings?

Yes please

>>What version of Crystal?

 11.0.0.2495

Can I not use string compare to check if mon =  "Mar" then , return "Mär" ?

Please advise

Thanks
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 38764252
Have you tried that?

Do you have the appropriate German font loaded?

mlmcc
0
 
LVL 34

Accepted Solution

by:
James0628 earned 500 total points
ID: 38766304
You might try a simple test.  Create a formula that just has a string that contains all of the German month names that you want to see.  Something like:

"Jan Feb Mar Apr May <and so on, but in German>"

 Put that formula on the report and see if the names come out correctly on the report.  If they look OK in the report preview, you should probably also try printing the report, to make sure that they print correctly.

 If so, then you could theoretically just use a formula to convert the date to a string with the German months.  For example:

Local StringVar Array Month_names := [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];

CStr (Day (CurrentDate), "#") + ". " + Month_names [ Month (CurrentDate) ] + " " + CStr (Year (CurrentDate), "#")


 You'd replace those English month names with the German versions, and replace CurrentDate if necessary (eg. if this is a date field and not just today's date).  If the date is in a field, you may want/need to make sure that it's not null, to avoid possible errors.

 There are, of course, any number of other ways that you could handle it.  That's just one approach.  FWIW, I think using an array for the month names simplifies things.

 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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 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

22 Experts available now in Live!

Get 1:1 Help Now