Editing the SQL statements of a query

In the Query Editor window, if you click the SQL button (or the View > Edit SQL menu command), a window will then be displayed showing the SQL statements used to execute the query like below.

You can edit the query statements in the text area as follows:

Notes:

Customized SQL mode

When creating a query using the Query Editor, JReport allows you to copy and paste your own SQL statement directly in the SQL window as explained above. However, because JReport query parser follows the SQL 92 standard, sometimes JReport is not able to parse the customized SQL statement. In this case, a warning message is displayed after you click the OK button in the SQL window asking whether to continue using the customized SQL statement. If you choose Yes, the customized SQL mode is enabled, in which all the functions in the Query Editor will be disabled, and you can only edit the query by modifying the SQL statement in the SQL window.

During the customized SQL mode, you can see the Customized SQL Mode option in the Query menu of the Query Editor is enabled and checked. By unchecking this option, you can go back to use functions of the Query Editor, in which case, the customized SQL statement will be lost and the SQL statement generated by JReport will be applied instead.

Note that you are required to guarantee the correctness of the customized SQL statement since JReport will not parse it.