Retrieve SQL Query From SimplyReports

Created by Matt Hammermeister, Modified on Wed, 7 Jun, 2023 at 1:45 PM by Matt Hammermeister

When running a report in SimplyReports, the website is creating a customized SQL search and sending it to the report server.  After the report has been generated, it's possible to retrieve the exact SQL search used.  This can be useful when learning how to use certain fields or for troubleshooting specific reports.



To find the SQL string:

  1. Create a run a report in SimplyReports as normal. After clicking Submit, you'll be taken to the report results page.
  2. On the report results page, right click and select "View Page Source" or in most browsers, press CTRL+U.
  3. If prompted with a "Confirm Form Resubmission" message, hit Refresh in the browser or press F5. The browser will display the HTML that generates the page.
  4. Press CTRL+F to search the HTML page. Search for SQLStatementHide
  5. Following the SQLStatementHide text, the "value" field will display the SQL query. (It starts with "Select"). Select the text and copy it.

  6. Paste the text into NotePad or a preferred text editor.  The query will be formatted for the web, so it may be necessary to add line breaks for readability or convert certain text like date fields.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article