Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Birt Viewier inside (integration) Web Application
tomar
Hi ,<br />
<br />
I have a requirement to integrate the birt-viewer with my web appication to view the reports. <br />
<br />
I know that we can install the birt viewer application in server( as stand alone application ) and use that to view the report from our own web application.<br />
<br />
i also know about how we can use birt ReportEngine in the application to view or generate the reports in any specific format(pdf,html.etc....) but that open in the broswer only( not in birt-viewer).<br />
<br />
<br />
<strong class='bbc'>Is there any way to merge birt viewer application inside the our own appliation and use it to view the reports in birt viewer without deploying as other stand alone application. ? </strong><br />
<br />
Please guide me to work on that. !!
Find more posts tagged with
Comments
mwilliams
Have you looked into the viewer tag library? It would allow you to embed the viewer into another page.
http://www.eclipse.org/birt/phoenix/deploy/viewerUsageMain.php#tags
tomar
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="116851" data-time="1368729809" data-date="16 May 2013 - 11:43 AM"><p>
Have you looked into the viewer tag library? It would allow you to embed the viewer into another page.<br />
<br />
<a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/deploy/viewerUsageMain.php#tags'>http://www.eclipse.org/birt/phoenix/deploy/viewerUsageMain.php#tags</a><br
/></p></blockquote>
<br />
<br />
Thanks For suggestion !!<br />
<br />
I already tried to use the birt viewer tag tlds library ,<br />
<br />
as per the given instruction ( as your provided link)<br />
<br />
<br />
1:- Create simple web application in eclipse <br />
2:- add the report engine jar files in my application lib.<br />
3:- add the birt.tlds file in my applcation tlds directory.<br />
3:- add the below code in my application web.xml <br />
<br />
********************<br />
<jsp-config><br />
<taglib><br />
<taglib-uri>/birt.tld</taglib-uri><br />
<taglib-location>/WEB-INF/tlds/birt.tld</taglib-location><br />
</taglib><br />
</jsp-config><br />
**************************<br />
<br />
4:- Call the below jsp file( as provideed in given link) to view report from my application (from html or Jsp)<br />
<br />
<br />
****************************<br />
<br />
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"<br />
pageEncoding="ISO-8859-1"%><br />
<%@ taglib uri="/birt.tld" prefix="birt" %><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a class='bbc_url' href='
http://www.w3.org/TR/html4/loose.dtd">'>http://www.w3.org/TR/html4/loose.dtd"></a><br
/>
<html><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><br />
<title>Insert title here</title><br />
</head><br />
<body><br />
<birt:viewer id="birtViewer" reportDesign="reportName.rptdesign"<br />
pattern="frameset"<br />
height="450"<br />
width="700"<br />
format="html"<br />
></birt:viewer><br />
</body><br />
</html><br />
<br />
*****************************************<br />
<br />
<br />
<br />
But same issue is here like we can open the report in html or pdf etc... one format as declare in the jsp files <br />
<br />
<birt:viewer> tags format attributs, <br />
<br />
But the problem is I want to open the reports in Birt Viewer ( ajax based in web brower, like stand alone birt-viewer in server where<br />
<br />
we have the options to export report to excel/pdf/html etc...and other option also like pagination/print/export etc in browser) <br />
<br />
<br />
please suggest if I missed some steps to add birt viewer tag library in application <br />
<br />
or any other way to use birt-viewer inside web application.
tomar
Any Suggestion ??
as using birt viewer JSP tag we can only view report in pdf/html ..etc format directly not in birt viewer.
But i want to view report in birt viewer (ajax based in web brower) from where user can export report itself in pdf/html/ etc ...any format what ever he want.
please suggest !!
mwilliams
I have a simple jsp page that embeds the viewer:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/birt.tld" prefix="birt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Report - JSP</title>
</head>
<body>
<birt:viewer
id="birtViewer"
reportDesign="SD.rptdesign"
pattern="frameset"
height="800"
width="775"
isHostPage="false"
frameborder="0"
scrolling="false"
style="border-radius:25px; border:3px solid silver"
format="html">
</birt:viewer>
</body>
</html>
</pre>
<br />
This shows the BIRT viewer, toolbars and all, embedded into my JSP page. This looks pretty much the same as you have. Maybe I'm missing something. You say above you don't want to deploy the viewer. With the viewer tag library, you'd still need to deploy the viewer to use the viewer.
tomar
Thanks Michael !! for response <br />
<br />
I got it now the problem was i need to provide the baseURL ( baseURL of birt viewer) attriutes value in viewer tag.<br />
<br />
I deployed the Viewer apps in same server and provide the baseURL of that in the my jsp page as below.<br />
<br />
and its is now working fine as report is opening in the Report viewer.<br />
<br />
*********************************<br />
<birt:viewer id="birtViewer" reportDesign="reportName.rptdesign"<br />
pattern="frameset"<br />
height="450"<br />
width="700"<br />
format="html"<br />
<strong class='bbc'>baseURL="/WebViewerExample"></strong><br />
</birt:viewer><br />
<br />
********************************
mwilliams
Great! Glad it's working! Let us know whenever you have questions!