SAP Knowledge Base Article - Public

2521213 - Error: 'The 'minOccurs' attribute cannot be present', when attempting to create a report based on ADO.NET (XML) in Crystal Reports


  • Error: 'The 'minOccurs' attribute cannot be present'
  • When trying to report off an XML file, it fails with an error.
  • When attempting to create a report off an XML file using the ADO.NET (XML) driver, in Crystal Reports, it fails with the error:
          'Logon failed.
           Details: <XML FILE NAME.XML>: The 'minOccurs' attribute cannot be present.'



  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. Create a new report in Crystal Reports designer.
  2. Choose the ADO.NET (XML) driver.
  3. Select the XML schema and click on Finish. (See below the sample schema.)
  4. It then displays the error:
    "Logon failed. Details: System.Xml : The 'minOccurs' attribute cannot be present."
    Sample XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="">
      <xs:element name="computer" minOccurs="1">
            <xs:element name="keyboard" minOccurs="0"/>
            <xs:element name="mouse" minOccurs="0"/>
            <xs:element name="monitor" minOccurs="0"/>


  • The reason this error occurs, it's because the minOccurs and maxOccurs attributes are not allowed on top-level <element> elements neither in XSD 1.0 nor in XSD 1.1. (For more information: W3C XML Schema Definition Language (XSD) 1.1 Section 3.3.2)
  • XML Schema Definition Language (XSD) 1.1 is not supported in ADO.NET driver.


  • Update the XML file to meet the XML Schema Definition Language (XSD) 1.0, which is fully supported in Crystal Reports.


crystal, xml,, schema, minoccurs, attribute cannot be present, logon failed, xsd 1.1 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem


SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016