Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Well, it is easy as you create a <form> with <textarea> to input statement. On the form submit, you get the the value of textarea which is the sql statement. Insert that value into report
$report = new MyReport(array( "sql"=>$_POST["sql"] ))
In the setup() function, you can get the sql through
Although this is not recommended to expose the sql statement at client-side like this but for personal use, why not.
Hope that helps.
Got it! Thanks.
1) But how can I change/customize the layout of the table of a report without taking exactly the result of the sql statement? 2) And how to allow the table to display value with decimal places? In my sql statement, there are decimal places, but the value did not display as value with decimal places.