@Phillip thanks for i have done. my question is let say you have a button on ABMaterial page and you want the user to click on that button so that the report can be generated and be displayed on ABMPDFViewer.
Here is my module for reportsPage class (attached).
It produces the above image.
Reports are generated as PDF and output to the PDF viewer (which is cool).
Of course, you won't be able to run this code exact since it relies on my tables to fetch data, but it will show you how to make it work for yourself and give you some ideas...