Query Engine Error 'If tables are already linked then the join type cannot change'

12 October 2005

Issue Description

When printing a custom Crystal Report with Forms Printer the Crystal Report does not print, and one of the following Query Engine error messages is displayed:


Query Engine Error: "If tables are already linked then the join type cannot change"


Query Engine Error: "This query cannot be performed.  An illegal link cycle was detected"


The errors indicate that the report contains cyclical joins that are resulting in an illegal query.  A report that contains a cyclical join will not always generate an error.  The illegal query is caused by a combination of the cyclical join and the data being requested.


It is important to note that these errors are not specific to Forms Printer but rather are errors being reported by Crystal Reports.  If the report were run directly from Crystal Reports, the same error would be generated.


In order to resolve this error the Crystal report must be modified so as to ensure that it does not generate an illegal query.  The illegal query is caused by a combination of cyclical table joins and the data being requested.


Specific guidance on the design of Crystal Reports is beyond the scope of Accountable Software technical support.  We are however able to provide a few possible resolutions based on our experience.


To troubleshoot this error open the report in Crystal Reports, select Database > Database Expert and click on the 'Links' tab.  If you have two (or more) tables joined to one table it is likely you will receive a cyclical joins error depending on the data the report returns.  To correct try the following:


1)   Change the join type of the many-to-one joins.  If you are using an inner join try changing this to a left-outer join.


2)   Redesign your report so that you are joining tables one-to-one or one-to many rather than many-to one.

Site Map