cancel
Showing results for 
Search instead for 
Did you mean: 

Dates appearing in US format even though Regional settings are UK

Former Member
0 Kudos

I am currently using Crystal 2008. I create new reports and format the date to use Windows Short format.

When I access the report through a URL, the date format is displayed as mm/dd/yy even though the Regional settings on the server are dd/mm/yy.

I know that I could work around this by setting the dates to Custom format (dd/mm/yy), but I really don't want to do this unless I have to - I prefer to leave it flexible and use the local Windows format.

I notice that there used to be a bug in Crystal XI to do with dates displaying in US format, but this was addressed in a Hot Fix and I assume is therefore unlikely to still be in Crystal 2008.

In addition, other reports which were created in previous versions of Crystal Reports are displaying correctly, even though the formatting options are exactly the same.

Very confused - does anyone have any ideas as what the problem might be?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are the regional settings the same on the testing machine? The machine you are using to view the reports?

It might be that the settings on your crystal reports server might not be setup correctly. I can't remember exactly where it is but there is an option in CR server where you can say "use server date" however you got to see if the same settings are applied in your end machine too.

Regards

Jehanzeb

Former Member
0 Kudos

Thanks for your reply. Have double checked the server and the client machine and both have the Regional date format correctly set to dd/mm/yy.

I can't understand why reports created in earlier versions of Crystal still seem to be OK, even though they are using the same settings (Windows Default Short).

We wondered if it was related to the fact that the server exporting the reports only had Crystal Reports for .NET Framework 2.0 (x86) on it - maybe it was slightly out of date, but have installed the full Crystal 2008 and it doesn't make any difference.

Former Member
0 Kudos

I doubt it if it is to do with .net to be fairly honest with you. It is something else. I am using old versions of my crystal reports and newer (2008) and they both appear to be fine. Just that I still have to use the american format in my formulas. So it goes like this (2008,10,01) instead of (01,10,2008). However saying that even using it in the formula the date still comes up fine.

i suspect it might be on the database level maybe there it might have been set differently? Its just a thought and I think worth checking.

Also what if you just create an empty report, place only date field onto the details section of that empty report from the same table and see how it prints it out.

Worth a shot?

Regards

Jehanzeb

former_member260594
Active Contributor
0 Kudos

Katerina,

CR 2008 allows you to select you preferred viewing locale. Go to View > preferred viewing locale > More... and select English (United Kingdom)

Former Member
0 Kudos

Thanks for your replies - Graham, I checked and reset the preferred viewing locale - doesn't seem to have affected the date problem, but it's useful to know that option is there, so thanks for that.

Jehanzeb - Good point on the database possibility - when I run the report locally using my machine as the web server, the date formats correctly, but when I run it from a different server (using my machine as the client), it doesn't. I realised that the server is looking at a different database, so switched my local machine to look at same db to see if that affected the date formats but didn't seem to make any difference.

I have created a new report and inserted a couple of date field in the Details section, and that gives me the same issue. If I run it using my local web server, displays OK, but when I run on other server, doesn't (despite regional date settings being the same).

Beginning to wonder if there is something environmental on the server that could potentially causing a problem.

Former Member
0 Kudos

Morning Katerina,

I am wondering you have checked the server as in Crystal Server and see if there is anything different there? If you run your machine as a server and displays the same dates it displays ok, however when run from the main server it doesn't display the dates properly then it is something to with the server. It may not be the regional issue it might be the date settings onto the server which are passing to the client machine.

Please check the server as in CR server or Tomcat or IIS which ever version you are running. Alternatively you can always install Crystal Reports onto the main server put the dates onto the details section and see how they are being displayed.

Regards

Jehanzeb

Former Member
0 Kudos

Morning Jehanzeb,

I think that you are right that it must be a setting on the server somewhere. Having installed Crystal onto it, if I create a standard report, insert some date fields and preview it, they display correctly, so it is only when the report is being produced through the webserver that the date format seems to be incorrect.

IIS is being used on the server to produce the output file, so maybe there is some IIS setting which is causing the problem.

Thanks for your help on this.

Regards,

Katerina

Former Member
0 Kudos

Morning,

Right one thing I did not understand here, you mentioned that you are using Crystal Reports 2008 with your web server?

What version of Crystal Reports Server are you using? because Crystal Reports Server 2008 is not compatible with IIS, well when I say that I mean, Crystal Reports Server 2008 comes with Apache server (Tomcat), and Tomcat doesn't like IIS.

In actual fact when I set up my Crystal Server I did not install IIS instead I changed the Tomcat port 8080 to 80 to relay my reports through it.

Secondly what connection are you using to view the reports? ODBC? or something else?

Regards

Jehanzeb

Former Member
0 Kudos

Apologies - I've not been very clear about our setup. We run the reports through a third party application. We are currently using Crystal 2008.

The reports are created in Crystal, but when accessed through the the third party app, they are run using .net component and an odbc connection and exported into a format selected by the user (pdf or Excel or Word, etc).

The application has it's own webserver and my machine is set up as a development environment so I can run the webserver locally. When the report is run through the application using my local webserver, the report is exported and the dates display correctly.

However, when the same report is run from the same application (only running from the main server), the dates do not display correctly in the exported file. The main server does use IIS , but only to allow the third party application to retrieve the report files and write the output files to a common location.

Does that make more sense?

Regards,

Katerina

Former Member
0 Kudos

Ah right, now it makes sense.

Can you run the application by using your dev box as a server to the destination machine? This is just to test if the main server is doing this or the application itself.

So set up the ODBC connection on the destination machine so that the destination machine looks for your dev box instead of main server.

Run the app and produce the pdf document and see if that produce the right dates.

Regards

Jehanzeb

Former Member
0 Kudos

Hi Jehanzeb,

I re-pointed the server on my dev box to run the application on the main/destination server and also re-pointed my ODBC settings to point at the same database as the main server.

When I ran the same report from the application on my dev box and viewed the output file, the dates were formatted correctly.

That makes it pretty definate to be something on the main server?

Regards,

Katerina

Former Member
0 Kudos

Yes! Katerina, It has to be something on the main server. First thing I would check is the settings on the main server how the application is processing the dates. Secondly will check the database application.

If nothing can be found onto the server, what I would do personally, is to take off the ODBC connection out and the application and resintall it (If that is ever possible).

Alternatively I would go back to Control Panel --->Languages and see if there are two languages (US and UK are present, if they do, check if UK is set as default. If it is then try taking off US and restart the server). See that makes any difference.

Regards

Jehanzeb

Answers (1)

Answers (1)

Former Member
0 Kudos

Any luck?

Regards

J

Former Member
0 Kudos

Hi Jehanzeb,

I have tried deleting the English (US) option from the Regional Languages and re-starting, but hasn't made any difference. I can't take off and re-install at the moment as the app is being accessed by other users.

I really don't know what is causing it, but might have to put on the back burner for a while to concentrate on other bits of development. As it appears to be a problem with the server rather than Crystal itself, should I mark this thread as answered?

If I find a solution then I will let you know, but thanks for all your help on this.

Regards,

Katerina

Former Member
0 Kudos

Hello,

It's entirely upto you if you want to mark the question as answered. I would personally look at the initial question and see if it has answered my query and if it has I would mark it otherwise I keep it as a note and will come back once I find the answer.

I am sure if you re-install the app in server that should resolve the issue.

In either cases please do update this post so we know what actually happened and how to resolve the issue. This will help others in future )).

Regards

Jehanzeb

Former Member
0 Kudos

Hi Jehanzeb,

Just had a final go at trying to figure out what the problem might be and did some searching in Google re: windows server 2003 date format. Found a brief article posted by someone with the same problem:

http://tim.mackey.ie/CrystalReportsNotPickingUpCorrectDateFormat.aspx

It seems that some user accounts (probably mainly default system accounts) are still set to use the US date format. Our application runs under the Network Service account, so this account must have been set to use US date format. This is a non-interactive account, so you can't use it to log on and change the date settings.

However, if you search in the registry under HKEY_USERS for sShortDate, you can find the users with sShortDate set to m/d/yy and change it to the required format (dd/mm/yyy). Just tried this and after re-starting the web service it worked - when the reports are run through the application on the main Windows 2003 server, the dates now display correctly!

Thanks for all your help - if you hadn't pointed me definitively to the server itself, I might not have thought to search on Windows 2003 servers ).

Regards,

Katerina

Former Member
0 Kudos

I am glad that it has been sorted and I am amazed that how the server sometimes plays a big role in different applications. Microsoft should be looking into these things and ship only UK or any other country versions of Servers. They have almost kept everything as US and presume that others would know what to do with the software they have developed.

Anyhow, I am glad it has been sorted and I will keep this in mind for future use.

Many thanks

Regards

Jehanzeb