Summary:

Errors exporting reports to Excel (or other Apache POI-provided formats, such as Excel CSV) may occur when using Sage CRM behind a reverse proxy or router. This issue can occur when the port being used to access CRM externally does not match the HTTP port being used on the CRM web server.

Symptoms:

This error only occurs in the specific specific circumstances where a customer has a router or reverse proxy that forwards HTTP requests to a CRM server. The CRM web server would have a binding on port 80, while the router would listen for requests from users on any ports other than 80 or 443.

In the example examined, customers accessed CRM on an FQDN similar to http://crm.panoply-tech.com:8080, while the CRM server had a binding on port 80.

On attempting to export a file to Excel, the following error message is displayed in CRM:

123 Companies processed

Error creating text file for export
System error: -2147012891

The following error is displayed in the eWare system log:

Sep 3 2015 10:05:09.222 14092 2272 5 START - doEndpointPost URL: http://crm.panoply-tech.com:8080:80/sdata/crmj/async/spreadsheetTask?trackingId=BEEC158D-5F49-44BE-B7AE-805FA8766339&type=CSVFOREXCEL&root=E%3A%5CSAGE_CRM%5CCRM%5CLibrary%5C&inputfile=E%3A%5CSAGE_CRM%5CCRM%5CLibrary%5CTEST+-+Sage+CRM+L3+Support_admin.csv&SID=117458691135183
Sep 3 2015 10:05:09.274 14092 2272 1 ERROR generating excel file. Message - System error: -2147012891 .

Note the malformed URL in the above log entry.

Cause:

The error is caused by an issue generating a local request responsible for creating the export file.



Resolution:

The issue can be worked around by ensuring that the CRM server has a HTTP binding on the same port as is used by users to access CRM via the reverse proxy or router.

Status:

This has been escalated as a bug to the development team, and will be fixed in a future patch for Sage CRM.