In JasperReports Server v5.x, there are two icon buttons in the AdHoc View Editor that users often wonder about how they are supposed to work:
The "change the input values" button is only available if your AdHoc view is created from a Topic and this Topic has input controls enabled.
The "view SQL query" button, by default, is not enabled. You need to login as the admin user and go to Manage - Server Settings - Ad Hoc Settings to enable (check mark) "Configure View Query". This is discussed in the JasperReports Server Administartion Guide, section 7.9.1 Ad Hoc Query Settings. You can find this document in our Documentation Section of our wedsite.
After enabling, users will able to use "view SQL query" feature in the Editor.