SAP Knowledge Base Article - Public

3128017 - Error: 'No value given for one or more required parameters' when refreshing a report connecting to Excel via OLEDB, in Crystal Reports

Symptom

  • Error: Failed to retrieve data from the database.
  • Error when refreshing a report based on Excel in Crystal Reports.
  • Able to refresh reports based on other MS Excel spreadsheet in Crystal Reports.
  • When refreshing a report based on a specific MS Excel spreadsheet, using an OLEDB connection in Crystal Reports, it fails with the error:
      
         "Failed to retrieve data from the database."
      
    Followed by:

         "Failed to retrieve data from the database.
          Details: ADO error code 0x80040e10
          Source: Microsoft Excel data engine
          Description: No value given for one or more required parameters."

         
         Excel - OLEDB - Error.png

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020 

Reproducing the Issue

  1. In Crystal Reports, create a new report.
  2. In the Database Expert, under "Create New Connection", double click on "OLE DB (ADO)"
  3. In OLE DB (ADO), select the Provider:"Microsoft Office Access Database Engine OLE DB Provider"
  4. In the Connection Information screen, select the MS Excel spreadsheet.
  5. For the option: Office Database Type, select: "Excel"
  6. Add at least one database field on the report.
  7. When refreshing the report, it fails with the error.

Cause

  • The OLEDB Provider fails to retrieve data because the column headers of the MS Excel spreadsheet, contain leading spaces.

Resolution

  • Remove the leading spaces for each column header in the MS Excel spreadsheet.
        
    1. In MS Excel, open the spreadsheet.
    2. Remove any leading spaces from each column header.  ( First row, for each column )
    3. Save the MS Excel spreadsheet. 

Keywords

CR, OLEDB , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020