Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

DateTime xml serialization error


I'm using Crystal Reports 2008 to design a report, and getting data from a WCF service. The WCF method getting called to get the data takes a few parameters, of which two of them are of typw DateTime. Most of the time, it works well, but for some specific times supplied in those parameters, the XML serialization does not work correctly: when the parameter's time is 1:00:00, or every 3 hours after that (4, 7, 10, ..., 22), the WCF gives a serialization error, that the serialized value is not a valide datetime value. The value for 1:00:00 gets serialized as 00:59:60, which the WCF does not recognize as valid, and the same happens for the other times specified above (4:00:00 gets serialized as 3:59:60, etc.). The problem has to be with Crystal Reports, because we've tried connecting to the same WCF service from a .NET application (taking Crystal Reports out of the picture), and supply those same times, and it all works as expected. Apparently, those specific times get serialized that way, which is not valid for the WCF deserializer. Does anyone know why this happens, and if there's an easy way to fix this in Crystal Reports, or maybe in the WCF service?



Former Member
Not what you were looking for? View more on this topic or Ask a question