After Releasing the report, sometimes you need to get the cell value by the mouse click event of the cell, how to implement the requirement RAQ Report implements this function by Defining this function in jsp.
Firstly, we need to know how the report is displayed on the web page. showReport.jsp under the installation directory of RAQ Report webappsquieereportJsp is a typical jsp example of report display.
In RAQ Report
, it can be seen that the whole report tag reporthtml is included in a table tag, when report is expanded, it is actually expanded in this table.
If you want to get the cell value by mouse click event, you have to locate the cell, And how to locate a cell Use the name attribute in reporthtml tag, then add the cell name to locate the cell for example report1_A1 represents cell A1 in report1.
var cell = document.getElementById("report1_A1"); // locate the cell by ID
alert(cell.value); // pop up a message box to display the cell value by alert() function