Date format changes to MM/dd/yyyy when returned through Web Service

I have a crystal report for 2003 framework 1.1, developed as a web service that is displaying dates in  system's default short date format (dd/MM/yyyy). When webservice returns the data the report changes the Date format to MM/dd/yyyy instead of systems default (dd/MM/yyyy), set through regional settings. so when i see the reports all the date fields are shown in MM/dd/yyyy format.

I have webservices and clients on the same machine. the database is on SQL Server 2000 which is also on same machine.

I am using Custom Style for all the date fields as I need the format to be the systems default short date as set by the user.
In current scenario the Regional Settings of the date format is dd/MM/yyyy. I have also tried culture entries in web.config but the results are same

Does anyone know how to handle this? Thanks in advance.
Who is Participating?
>>> I cannot make the dataformat same for all clients.

Then your only option is to send a parameter to the report that specifies the date format and use formulas to convert dates to the format desired.  Basically the same approach that mlmcc gave you the link to above, just modify it to put if...then or case structure so that the format used depends on a parameter field.

you can set date setting like this in
file, options, field, dates
then pick the format you want


then you will click the date tab. Pick the formay you want. Crsytal will format all the newly created date fields in this format
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Could be that Crystal uses the date format on the server regardless of client settings?
ns21Author Commented:
As I said I want the format which is set in the regional settings by the user, I have already mentioned the settings above in the question, If u missed that please re-look. To make it more simple consider this scenario: if client is in canada (dd/mm/yyyy) and weservices are in US (MM/dd/yyyy), the response/report to the client in canada should be in dd/mm/yyyy format but for client in US the reponse/report would be in MM/dd/yyyy format.
ns21Author Commented:
frodoman, but as I mentioned in the Question, I am hosting web services and database on same machine And running the client on the same machine. but the formatting still differs
check this out

By the way We are trying to help you here.What do you mean if u miss please relook. We can miss. If we miss, that can also mean that you didnt explain well
In order to avoid problems...I always explicitly make all date fields in my report to a format that is easily understood by any user from any region...


Good point natloz.

You might want to look at this

It implies CE uses the regional setting on the user's machine but otherwise it recommends using a formula to convert dates to formatted text.

ns21Author Commented:
ebolek thanks for all ur help I appreciate that but seriously speaking the proposed solution should be in context of the question asked.

natloz u r very right, changing the date format to dd-MMM-yy would avoid all sort of problems, I wish i could do that. However the application what I am developing should strictly inherit the culture settings of client irrespective of web server/database server regionals.

mlmcc I had set the registry settings too to dd/mm/yyyy but still the report when returns changes the format to mm/dd/yyyy.
ns21Author Commented:
For CR version 9, whether the same service is available?  we actually suspected that registry setting could be one of the issue but The registry settings are already being set to dd/mm/yyyy, still the report when returns changes the format to mm/dd/yyyy.
what's the procedure usually u follow to consume a web service report?

I cannot make the dataformat same for all clients.

to publish the report as web service
1. right click on the rpoject name on the solution explorer add, add existing items your project
4.right click on the report sleected from sol. explorer and select publish as web service
5.this add sthe web service to your class

To comsume web service
1.right click on project
2. select add web reference web services on the local machine
4. find the web service you just created
5. click add reference button

put this code
crystalviewer1. reportsource = new localhost.webservice or
crystalviewer1.reportsource = "http://localhost//webservice.asmx"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.