View Full Version : Integration of reports into a web page

05-24-2010, 08:31 AM
I am evaluating Pentaho and need to know if there is an effective method of integrating reports into a web page. I looked at the open source Birt solution and in that, integration requires a non-open source components (iserver). An open source viewer is provided, but that I believe it opens in a separate page which doesn't fit my requirements. Does the Pentaho solution provide a solution to this issue? Does it have a Javascript component for integration?

Thanks in advance.

05-24-2010, 06:28 PM
You can call the XAction or reporting plugin directly and it will then generate a plain HTML file for you. If you use the "dashboardmode" parameter, you can also trigger the generation of a HTML fragment (which is a HTML document without the <html>, <head> and <body> tags).

A rather comprehensive list of all the parameters and URLs you can use in conjunction with the PRPT mode:

If you aim to build dashboards, then the Community Dashboard Project is the place to seek out JavaScript components that display reports easily (along with all the other dashboard related stuff, like parameter prompts, charts and links between all of them).

(PS: Within the user console, double-clicking on the tab-title of a report or XAction gives you the URL for the content of that tab - without any of the User-Console stuff.)

05-27-2010, 04:10 PM
Thank you for confirming that it is possible to embed a report in an HTML page without the use of iserver. Does the community have any coding examples for this approach that you can point me to or a public site that uses this approach?

Regarding the code snippet that was in the link you provided:

"http://localhost:8080/pentaho/Home?name=Inventory%20in%20PUC&startup-url=http%3A%2F%2Flocalhost%3A8080%2Fpentaho%2Fcontent%2Freporting%2Freportviewer%2Freport.html%3Fsolution%3Dsteel-wheels%26path%3D%2Freports%26name%3DInventory.prpt (http://localhost:8080/pentaho/Home?name=Inventory%20in%20PUC&startup-url=http%3A%2F%2Flocalhost%3A8080%2Fpentaho%2Fcontent%2Freporting%2Freportviewer%2Freport.html%3Fsolution%3Dsteel-wheels%26path%3D%2Freports%26name%3DInventory.prpt)"

Would I be doing an ajax call to implement the code above? And then receive the html response from the ajax call (e.g., per your previous post "dashboard mode")?

Do I need to write any Java code to implement this?

I am very encouraged that there is an effective approach to integrate the report into a web page.