Sage CRM 2018R3 Issue Exporting Report to XLSX

This question is not answered

I am having an issue exporting a report to XLSX in Sage CRM 2018R3.  The message on screen is the typical message, An error occurred while running the report.  Error generating report.

Exporting to CSV and Excel CSV work fine, no issues.  All other tomcat related features(dashboard, exchange integration, etc) all are working fine.  Exporting to XLSX works fine for some reports but not all.

The error in the logs I get is below.  The data being returned in one of the reports with error is nothing out of the ordinary, it contains currency type fields in the report, but no nulls, either 0.0000 for a greater value.  The error message below refers to an empty String.

Has anyone encountered this before?  Any thoughts?

Jan 27 2019 18:09:32.393 3704 6944 5 START - doEndpointGet URL: http://localhost/sdata/crmj/async/spreadsheetTask?trackingId=C8A257AD-ECD6-4265-8B94-FF3AC01D3181&SID=127709436660515
Jan 27 2019 18:09:32.544 3704 6944 5 FINISHED - doEndpointGet finished URL: http://localhost/sdata/crmj/async/spreadsheetTask?trackingId=C8A257AD-ECD6-4265-8B94-FF3AC01D3181&SID=127709436660515
Jan 27 2019 18:09:32.547 3704 6944 1 ERROR generating excel file. HTTP status:500 Message: <diagnoses><errorMessages><errorMessage><info>com.sage.crm.core.exception.SageAsyncProcessException: Report generation failed
Exception in thread "main" com.sage.crm.core.exception.SageReportGeneratingException: java.lang.NumberFormatException: empty String&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.generate(;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorManager.generate(;
at com.sage.crm.core.util.reportgenerator.ReportProcess.generateReport(;
at com.sage.crm.core.util.reportgenerator.ReportProcess.main(;
Caused by: java.lang.NumberFormatException: empty String&#13;
at sun.misc.FloatingDecimal.readJavaFormatString(;
at sun.misc.FloatingDecimal.parseDouble(;
at java.lang.Double.parseDouble(;
at java.lang.Double.&lt;init&gt;(;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorSpreadsheet.currencyStringToDouble(;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorSpreadsheet.processSummaryBand(;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.buildReport(;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorSpreadsheet.buildReport(;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.generate(;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.generate(;
... 3 more&#13;

at com.sage.crm.core.async.task.SpreadsheetTask.execute(;
at com.sage.crm.core.async.TaskProcessor.process(;
at sun.reflect.GeneratedMethodAccessor692.invoke(Unknown Source)&#13;
at sun.reflect.DelegatingMethodAccessorImpl.invoke(;
at java.lang.reflect.Method.invoke(;
at org.springframework.expression.spel.ast.MethodReference.getValueInternal(;
at org.springframework.expression.spel.ast.MethodReference.access$000(;
at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(;
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(;
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(;
at org.springframework.expression.spel.standard.SpelExpression.getValue(;
at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(;
at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(;
at org.springframework.integration.util.MessagingMethodInvokerHelper.process(;
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(;
at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(;
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(;
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(;
at org.springframework.integration.endpoint.PollingConsumer.handleMessage(;
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(;
at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(;
at org.springframework.integration.endpoint.AbstractPollingEndpoint$;
at org.springframework.integration.endpoint.AbstractPollingEndpoint$;
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$;
at org.springframework.integration.util.ErrorHandlingTaskExecutor$;
at java.util.concurrent.ThreadPoolExecutor.runWorker(;
at java.util.concurrent.ThreadPoolExecutor$;
Caused by: com.sage.crm.core.exception.SageEndpointException: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)&#13;
at com.sage.crm.core.async.task.SpreadsheetTask.execute(;
... 28 more&#13;
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)&#13;
at org.apache.commons.exec.DefaultExecutor.executeInternal(;
at org.apache.commons.exec.DefaultExecutor.execute(;
at org.apache.commons.exec.DefaultExecutor.execute(;
... 29 more&#13;
Jan 27 2019 18:09:32.547 3704 6944 1 ERROR generating excel file. Message - Error generating report. .
Jan 27 2019 18:09:32.558 3704 6944 4 EndUserAction,User,Action,Time 210 1411 6266

All Replies
  • Is there anything in the Tomcat SQL log?

    The error

    java.lang.NumberFormatException: empty String

    suggests that something being passed to the Export that expects a value is empty.

    And is this export taking place from a Report or from a Group?

  • Hi Jeff,

    That was the only log with error I was able to find.  Is there anther specific location and log file I might be overlooking?

    This export is taking place from a Report

  • The SQL logs will be found under

    C:\Program Files (x86)\Sage\CRM\CRM\Logs

    And will have a name like 20190125sql.log

    The logging level is set within the file log4j.xml within

    C:\Program Files (x86)\Sage\CRM\CRM\tomcat\webapps\crmj\WEB-INF

    Change the logging level to ERROR or DEBUG within the file.  (Take a copy of this before you do in case)

       <!-- SQL Logs -->

       <logger name="jdbc.sqlonly" additivity="false">

           <level value="FATAL"/>

           <appender-ref ref="sql"/>


    If the export fails in the context of a report, does it work with other reports?  Does an export from a group work?  Could the view or the dataset returned by the view be at fault?

  • Set to Debug or Error, nothing populates in the file.  Other reports XLSX export works fine.  I may just try recreating this report and seeing what happens.

    Group exports, export from search, all work fine because your only options are Excel CSV or CSV.  This issue is only occurring with XLSX.  And the data source view is fine, the exact query that the report runs (which I identified in sql profiler)l executes without issue in sql.  And multiple reports are using the same view.

  • That does seem to narrow it down to being the single report definition.  

  • Jeff, reports that have the issue have an integer field.  When I remove the integer field as a report column, the report exports to XLSX, but with the integer field I get the error.  The data in the report for this field is 0 and greater.  I see no issues with the data.  Could this be a bug with 2018R3?

  • If you can reproduce this then you should log this with Support.