JReport Designer provides you with the option of choosing whether or not to use the Pre-join feature when creating queries. If you want to use it, you must have this option enabled.
To turn on the Pre-join feature:
Then, when you add tables contained in the data source to queries in the same data source, the pre-joins defined on the data source will be automatically applied to the tables.
When you create a query using the pre-join feature, the following cases may appear:
Suppose you've added table A and C to your query, a message box will then appear asking you whether you want to add table D in order to create links between tables A and C.
Note: The prompt message appears only when the option "Show warning message when adding tables" is selected in the Query Editor category of the Options dialog. Otherwise, JReport will add the bridged table automatically without any prompt.
You've added table A and C to the query, and there are two paths available - ABC and ADC. JReport Designer will ask you for the path ABC or ADC.
JReport Designer provides two methods for seeing the path information of a query:
One query is bound with at most one path. Once a path has been specified for a query, when you modify the relationships among the tables, you can make changes to a specific query based on that path, but the path itself will not be changed. When you edit a query, the following cases may appear: