Unfortunately I am still getting a join error. Here is the syntax I am using:
=";WITH CTE (Calculated_Status, JCDept2_Description, JobAsmbl2_AssemblySeq, JobAsmbl2_PartNum, Calculated_MinOp, Calculated_OpenJobQty, Calculated_OpenJobValue, JobHead_Company, JobHead_Date08, JobHead_DueDate, JobHead_JobNum, JobHead_ReqDueDate, JobHead_StartDate, JCDept2_Description, JobAsmbl2_AssemblySeq, JobAsmbl2_PartNum, Calculated_OpenJobQty, Calculated_OpenJobTarget, JobHead_Company, JobHead_JobNum)
AS (SELECT T1.[Calculated_Status], T1.[JCDept2_Description], T1.[JobAsmbl2_AssemblySeq], T1.[JobAsmbl2_PartNum], T1.[Calculated_MinOp], T1.[Calculated_OpenJobQty], T1.[Calculated_OpenJobValue], T1.[JobHead_Company], T1.[JobHead_Date08], T1.[JobHead_DueDate], T1.[JobHead_JobNum], T1.[JobHead_ReqDueDate], T1.[JobHead_StartDate], T2.[JCDept2_Description], T2.[JobAsmbl2_AssemblySeq], T2.[JobAsmbl2_PartNum], T2.[Calculated_OpenJobQty], T2.[Calculated_OpenJobTarget], T2.[JobHead_Company], T2.[JobHead_JobNum]
FROM OpenJobValues_" + Parameters!TableGuid.Value + " AS T1
FULL OUTER JOIN OpenJobTargets_" + Parameters!TableGuid.Value + " AS T2
ON T1.[JobHead_Company] = T2.[JobHead_Company] AND T1.[JCDept2_Description] = T2.[JCDept2_Description] AND T1.[JobHead_JobNum] = T2.[JobHead_JobNum])
SELECT Calculated_Status, JCDept2_Description, JobAsmbl2_AssemblySeq, JobAsmbl2_PartNum, Calculated_MinOp, Calculated_OpenJobQty, Calculated_OpenJobValue, JobHead_Company, JobHead_Date08, JobHead_DueDate, JobHead_JobNum, JobHead_ReqDueDate, JobHead_StartDate, JCDept2_Description, JobAsmbl2_AssemblySeq, JobAsmbl2_PartNum, Calculated_OpenJobQty, Calculated_OpenJobTarget, JobHead_Company, JobHead_JobNum FROM CTE"
I removed all the controls from the report just to be safe. But I am still getting this error:
Program Ice.Services.Lib.RunTask when executing task 462578 raised an unexpected exception with the following message: RunTask:
Ice.Core.SsrsReportService.ReportExecutionSoapException: Exception of type 'Ice.Core.SsrsReportService.ReportExecutionSoapException' was thrown.
SOAP Fault: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'OpenJobValues'. ---> System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'JOIN'.)
Detail: <ErrorCode xmlns="http://www.microsoft.com/sql/reportingservices">rsProcessingAborted</ErrorCode><HttpStatus xmlns="http://www.microsoft.com/sql/reportingservices">400</HttpStatus><Message xmlns="http://www.microsoft.com/sql/reportingservices">An error has occurred during report processing.</Message><HelpLink xmlns="http://www.microsoft.com/sql/reportingservices">https://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Exceptions.ErrorStrings&EvtID=rsProcessingAborted&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=15.0.1102.897</HelpLink><ProductName xmlns="http://www.microsoft.com/sql/reportingservices">Microsoft SQL Server Reporting Services</ProductName><ProductVersion xmlns="http://www.microsoft.com/sql/reportingservices">15.0.1102.897</ProductVersion><ProductLocaleId xmlns="http://www.microsoft.com/sql/reportingservices">1033</ProductLocaleId><OperatingSystem xmlns="http://www.microsoft.com/sql/reportingservices">OsIndependent</OperatingSystem><CountryLocaleId xmlns="http://www.microsoft.com/sql/reportingservices">1033</CountryLocaleId><MoreInformation xmlns="http://www.microsoft.com/sql/reportingservices"><Source>Microsoft.ReportingServices.ProcessingCore</Source><Message msrs:ErrorCode="rsProcessingAborted" msrs:HelpLink="https://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Exceptions.ErrorStrings&EvtID=rsProcessingAborted&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=15.0.1102.897" xmlns:msrs="http://www.microsoft.com/sql/reportingservices">An error has occurred during report processing.</Message><MoreInformation><Source>Microsoft.ReportingServices.ProcessingCore</Source><Message msrs:ErrorCode="rsErrorExecutingCommand" msrs:HelpLink="https://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Exceptions.ErrorStrings&EvtID=rsErrorExecutingCommand&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=15.0.1102.897" xmlns:msrs="http://www.microsoft.com/sql/reportingservices">Query execution failed for dataset 'OpenJobValues'.</Message><MoreInformation><Source>.Net SqlClient Data Provider</Source><Message>Incorrect syntax near the keyword 'JOIN'.</Message></MoreInformation></MoreInformation></MoreInformation><Warnings xmlns="http://www.microsoft.com/sql/reportingservices" />)
at Ice.Core.SsrsReportService.ReportExecutionService.Render(String format, String deviceInfo, String& extension, String& mimeType, String& encoding, Warning[]& warnings, String[]& streamIds) in C:\_releases\ICE\ICE4.2.200.11\Source\Shared\Lib\ReportingServices\ReportExecutionService.cs:line 154
at Ice.Core.SsrsReporting.SsrsRendererBase.Render(SsrsRenderInformationBase renderInformation) in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsRendererBase.cs:line 148
at Ice.Core.SsrsReporting.SsrsRendererBase.TraceReportRendered(String printProgram, String ssrsRenderFormat, Func`1 timedAction) in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsRendererBase.cs:line 0
at Ice.Core.SsrsReporting.ReportProcessorBase.RenderReport(String ssrsRenderFormat, String printProgram, Boolean ignorePageSettings) in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 0
at Ice.Core.SsrsReporting.ReportProcessorBase.RenderReportForPreviewOrGenerate(RenderedSsrsReport renderedReport) in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 422
at Ice.Core.SsrsReporting.ReportProcessorBase.ProcessReportPart(String reportLocation) in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 163
at Ice.Core.SsrsReporting.StandardReportProcessor.ProcessReportParts() in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\SsrsReporting\StandardReportProcessor.cs:line 34
at Ice.Core.RoutingAndBreaking.ReportPersister.Persist(ReportInstanceInformation reportInstance, Func`2 reportsRenderer, Action`1 fillSysRptLstRow, Action`2 processReport, Func`3 filterTableAttachmentsFunc) in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\ReportPersister.cs:line 58
at Ice.Core.RptBase.ReportSsrsDatabaseBuilder.RenderUnroutedSsrsReport() in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\RptBase\ReportSsrsDatabaseBuilder.cs:line 359
at Ice.Core.RptBase.ReportDatabaseBuilder.XMLClose() in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 93
at Ice.Core.RptTaskBase`1.XMLClose() in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 260
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 68
at Ice.Hosting.TaskCaller.ExecuteTask() in C:\_releases\ICE\ICE4.2.200.11\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 64
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:\_releases\ICE\ICE4.2.200.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:\_releases\ICE\ICE4.2.200.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 450