I bumped into an issue today with a Crystal Report that would not run. It had ran previously and other reports in the system were running fine.
Checking the event log showed this error:
ERROR Quartz.Core.ErrorLogger – Job SlxJobService.Saleslogix.Reporting.Jobs.CrystalReportsJob threw an exception.
Quartz.SchedulerException: Job threw an unhandled exception. —> Saleslogix.Reporting.Jobs.ReportingJobContextException: The Crystal Reports Job has failed. —> CrystalDecisions.Shared.CrystalReportsException: The report may have invalid schema. Validate the tables, fields, and procedures in the main report document and all subreports. —> System.Runtime.InteropServices.COMException: The system cannot find the path specified. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
What the… ?? Considering what I was doing, none of this made any sense. My report was correct. It ran fine outside of InforCRM, and Validating items in Crystal showed all items as valid.
The problem was due to a comment I had in the record selection formula. Apparently, if you have commented-out code with no other text, the report cannot be run from InforCRM.
To get around this, you have a couple options. First of all, you could remove the commented-out code. If the Record selection criterion is empty, then there is no issue. If, however; you want to keep that information there (like in my case, to save testing code), then you can also add something after the comment that would resolve as “True” in crystal. As long as it has something valid, it should be fine.
So, adding something like “1=1” Should come up as valid (no errors found), and will allow the report to run from InforCRM while also keeping your comments.
Thanks for reading!