Display data in a pop-up and print the page
By clicking on a button named " generate report" or "summarize" some sort of pop-up would show summarizing the collected data showing value like average, total, etc... it also comes with a graph. On the corner of the page displaying summarized results there would be a print button to print the summary page
How would I open a new window/tab or some sort of section to display the report? And how would i be able to print it in the same format as it is?
You can use jQuery UI dialog to create modal popup. Inside of this dialog you can put everithing you need. But if need to pring it - better create in js new window and put information there:
To print browser window content just call in onClick for your button:
<input type="button" value="Print" onClick="window.print();" />
For graphical information I prefer jqPlot. Try it - that is nice tool. See demo here.
If you need high quality printing than generate pdf or xlsx. If you use java and tomcat you can easilly integrate JasperServer to your application.