Pages

Tuesday, April 30, 2013

Pentaho Report Integration in iframe

Camera Accessories. Free Shipping!


Ques:- Integrating pentaho report viewer into iframe

Integrating pentaho Report(published to BI server) can be done in google chrome browser but it can not be achieved in Mozilla Firefox and Internet Explorer for detail refer the issue at pentaho


But there is an alternative to achieve the desired and get through integration of report in iframe, as we all know the reporting url in pentaho looks something like this http://localhost:8080/pentaho/content/reporting/reportviewer/report.html?solution=steel-wheels&path=%2Freports&name=mainreport_steelwheels.prpt&locale=en_US&output-type=application/pdf in which report is shown in pentaho report viewer.
But due to pentaho report viewer issue with Firefox and IE we can not show the report in iframe, so what if we remove the reportviewer component. Lets do it:- remove the /reportviewer/report.html from your url. your new url will something look like this:- http://localhost:8080/pentaho/content/reporting/?solution=steel-wheels&path=%2Freports&name=mainreport_steelwheels.prpt&locale=en_US&output-type=application/pdf.
After doing this you will see you don't have any Export option in your report as it was in report viewer but don't worry you can have your own drop down list for Exporting. I will explain you how, see the last parameter in the url output-type which is defining the output-type of report, I am viewing as PDF, one can also view as HTML or RTF or excel. what we need to do is define a new drop down list and pass it's value to output-type.

3 comments:

  1. I have another solution using proxy server. I explain that in my blog
    http://fabiantowang.blogspot.com/2013/07/embed-pentaho-report-viewer-to-web.html

    ReplyDelete
  2. In my solution of Integrating reports in an iFrame there was a problem of pagination to refrain from this problem append your URL with a new parameter &output-target=table/html;page-mode=stream and for parameter u will have to create your own UI for parameter.:) thank u

    ReplyDelete
    Replies
    1. I got one more solution if u must want to have pagination and not to view all data at a single page. append url with &accepted-page=0 and in your UI define 2 buttons previous & next and when someone will click on next value will get incremented and if someone will click previous accepted-page value get decremented. I know it is hectic to design a button but I am only telling a possible solution that might solve your problem of pentaho report viewer in iFrame, by this solution user will also not get to know that he has been redirected to somewhere new place(pentaho BI server).

      Delete