SAP Knowledge Base Article - Public

2567826 - Failed to retrieve data from the database. Details: XML field value is invalid empty string using Crystal Reports for Visual Studio WEB Service XML driver

Symptom

  • No Empty String
  • NULL and Empty String are both interpreted as NULL
  • Unable to make the difference between an Empty String and NULL values when reporting off an XML file.
  • When reporting off an XML file using the XML and Web Services Driver in Crystal Reports, Empty Strings are interpreted as NULL

Environment

  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • Crystal Reports, Developerversion for Visual Studio SP 21

Reproducing the Issue

  1. In Crystal Reports, create a report off an XML file containing Empty Strings(data tags having no value inside), using the XML and Web Services driver.
  2. Notice all Empty String are interpreted as NULL value in Crystal Reports.
  3. In Visual Studio it returns an error: Failed to retrieve data from the database. Details: XML field value is invalid empty string

 

Cause

Value for data tags having no values inside the xml file are interpreted as NULL instead of blank/empty value in Crystal Reports.

Resolution

Due to SAP updating the XML/WEB Services driver and following the W3C Standards the solution is to make sure your XML has the following tag:

xsi::nil=’TRUE’

Doing so directs the WEB Services crdb_xml.dll DB driver to treat NULL's and Empty Strings correctly.

This issue was introduced in the patches listed in the "Support Packages & Patches" section below.
The "Support Packages & Patches" section will be populated with the relevant patch levels once they are released.
For Business Intelligence Platform maintenance schedule and strategy see the Knowledge Base Article 2144559 in References section.

To download CR for VS SP 21 runtime packages go here:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Keywords

Support Package Patches
Software Component
Support Package
Patch Level
CRYSTAL REPORTS FOR VS SP022 000000
SAP CRYSTAL REPORTS 2013 SP010 000000
SAP CRYSTAL REPORTS 2016 SP005 000000
SAP CRYSTAL REPORTS 2019 SP000 000000
SBOP BI PLATFORM SERVERS 4.1 SP010 000000
SBOP BI PLATFORM SERVERS 4.2 SP005 000000
SBOP BI PLATFORM SERVERS 4.3 SP000 000000
CR, XML empty string, Failed to retrieve data from the database. Details: XML field value is invalid empty string , KBA , BI-RA-CR-SDK , SDK related, including Java/.NET etc. , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio