Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Al Y
how to integrate birt report
December 21, 2007 5:04 PM
Answer

Al Y

Rank: New Member

Posts: 5

Join Date: December 14, 2007

Recent Posts

I would like to view a BIRT report within a liferay portlet. Has anyone had success in deploying a birt portlet? How come there are no articles mentioning BIRT? <frustrated BIRT report developer></frustrated BIRT report developer>emoticon
Roman Hoyenko
RE: how to integrate birt report
December 27, 2007 9:02 AM
Answer

Roman Hoyenko

Rank: Liferay Master

Posts: 868

Join Date: October 8, 2007

Recent Posts

I haven't seen a discussion about this portlet here in the community. Is there a JSR-168 compliant portlet available to view BIRT reports? If there is it should work within Liferay.
Al Y
RE: how to integrate birt report
December 27, 2007 3:36 PM
Answer

Al Y

Rank: New Member

Posts: 5

Join Date: December 14, 2007

Recent Posts

There is and isn't. Actuate has developed birt portlets (not sure if they are JSR168) for their own iPortal software, which I believe is also based on Liferay. However, it is highly customized to that environment. So in reality, there isn't, hence the need to perform integration. So can anyone shed light on this?
Roman Hoyenko
RE: how to integrate birt report
December 28, 2007 7:18 AM
Answer

Roman Hoyenko

Rank: Liferay Master

Posts: 868

Join Date: October 8, 2007

Recent Posts

Well, if it is based on Liferay, I am pretty sure it could be installed. Did you try to deploy it on Liferay?
David Hay
RE: how to integrate birt report
January 9, 2008 2:01 PM
Answer

David Hay

Rank: Junior Member

Posts: 30

Join Date: January 2, 2008

Recent Posts

Any success with this? We're looking to do the same thing...
Al Y
RE: how to integrate birt report
January 10, 2008 8:46 AM
Answer

Al Y

Rank: New Member

Posts: 5

Join Date: December 14, 2007

Recent Posts

Nope, not yet. Still working on it.

I'm much surprised due to the popularity of BIRT that there isn't more support the subject.
David Hay
RE: how to integrate birt report
January 29, 2008 1:20 PM
Answer

David Hay

Rank: Junior Member

Posts: 30

Join Date: January 2, 2008

Recent Posts

Did you see this?

http://wiki.eclipse.org/Portlet_Example_%28BIRT%29_2.1
Ashutosh Patel
RE: how to integrate birt report
April 3, 2008 7:40 AM
Answer

Ashutosh Patel

Rank: New Member

Posts: 2

Join Date: April 3, 2008

Recent Posts

Hi Guys,
I was successfully able to integrate birt report with Liferay portlet.
I just followed above link (http://wiki.eclipse.org/Portlet_Example_%28BIRT%29_2.1) . But i got problem of getting reference to PortletContextImpl. Even after adding the jar in classpath, I got class cast exception. Moreover, it made the portlet non JSR compliant implying that it could not be ported directly to other portal servers.

Then instead of passing ServletContext in WebReoprt.java, I used PortletContext.
PortletContext pc = req.getPortletSession().getPortletContext();
this.birtReportEngine = BirtEngine.getBirtEngine(pc);

In BirtEngine.java, I used following approach:

config.setEngineHome(pc.getRealPath("/WEB-INF/platform"));
//IPlatformContext context = new PlatformServletContext( sc );
//config.setPlatformContext( context );

Then everything works fine!
Bryan Cheung
RE: how to integrate birt report
June 19, 2008 10:55 AM
Answer

Bryan Cheung

LIFERAY STAFF

Rank: Expert

Posts: 359

Join Date: August 26, 2004

Recent Posts

Ashutosh Patel:
Hi Guys,
I was successfully able to integrate birt report with Liferay portlet.
I just followed above link (http://wiki.eclipse.org/Portlet_Example_%28BIRT%29_2.1) . But i got problem of getting reference to PortletContextImpl. Even after adding the jar in classpath, I got class cast exception. Moreover, it made the portlet non JSR compliant implying that it could not be ported directly to other portal servers.

Then instead of passing ServletContext in WebReoprt.java, I used PortletContext.
PortletContext pc = req.getPortletSession().getPortletContext();
this.birtReportEngine = BirtEngine.getBirtEngine(pc);

In BirtEngine.java, I used following approach:

config.setEngineHome(pc.getRealPath("/WEB-INF/platform"));
//IPlatformContext context = new PlatformServletContext( sc );
//config.setPlatformContext( context );

Then everything works fine!


That's great news, Ashutosh! I was talking to someone interested in Liferay today and he was also interested in using BIRT.

If you send us the portlet, we can make it available in the portlet repository. What do you think?
Arun Kumar S
RE: how to integrate birt report
September 2, 2008 10:31 PM
Answer

Arun Kumar S

Rank: Regular Member

Posts: 181

Join Date: June 23, 2008

Recent Posts

Hi,

plz help me....

I built BIRT report into liferay and it works generating HTML
reports. But I need PDF format, so I changed to
resp.setContentType("application/pdf"); and
OUTPUT_FORMAT_PDF
but I don't get any output, just a blank screen.
In Eclipse preview, the PDF works.
Ganesh Ram
RE: how to integrate birt report
January 21, 2009 10:00 PM
Answer

Ganesh Ram

Rank: Regular Member

Posts: 201

Join Date: February 5, 2008

Recent Posts

I tried building the portlet using the instructions [url=http://wiki.eclipse.org/Portlet_Example_(BIRT)_2.1]here.

The IReportEngineFactory object is always null.


 1
 2
 3EngineConfig config = new EngineConfig();
 4config.setEngineHome("");
 5//config.setBIRTHome(sc.getRealPath("/WEB-INF/platform"));
 6IPlatformContext context = new PlatformServletContext(sc);
 7config.setPlatformContext( context );
 8
 9try{
10    Platform.startup( config );
11}
12catch ( BirtException e )
13{
14    e.printStackTrace( );
15}
16IReportEngineFactory factory = null;
17try{
18    factory = (IReportEngineFactory) Platform.createFactoryObject("org.eclipse.birt.report.engine.api.impl.ReportEngineFactory");
19}
20catch(Exception e){
21                e.printStackTrace();
22}
23                        
24System.out.println("factory: "+factory);


How did you guys get the birt portlet running ?
Any mistake that iam doing ?
xavi c o
RE: how to integrate birt report
January 22, 2009 8:11 AM
Answer

xavi c o

Rank: Junior Member

Posts: 40

Join Date: January 5, 2009

Recent Posts

I guess that's the code for BirtEngine.java. If so:

config.setEngineHome("");
//IPlatformContext context = new PlatformServletContext( sc );
//config.setPlatformContext( context );
config.setEngineHome(sc.getRealPath("/WEB-INF/platform"));

Also, you need to change the receiver parameter "ServletContext sc" for "PortletContext sc", and import the package "javax.portlet.PortletContext;", of course.

Good luck !!
Ganesh Ram
RE: how to integrate birt report
January 22, 2009 8:53 AM
Answer

Ganesh Ram

Rank: Regular Member

Posts: 201

Join Date: February 5, 2008

Recent Posts

I got it working !
I had not put the platform\configuration\config.ini file.
Jonas Yuan
RE: how to integrate birt report
July 29, 2009 1:32 PM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Ganesh

That's great that you have made the BIRT portlet working in Liferay.

Do you plan to share your work in Liferay community? Love to play with the BIRT portlet.

Thanks

Jonas Yuan

-----------------
Liferay Books

Liferay Portal 5.2/5.3 Systems Development
Liferay Portal 4.4/5.0 Enterprise Intranets
Shravan A
RE: how to integrate birt report
August 28, 2009 12:37 AM
Answer

Shravan A

Rank: Junior Member

Posts: 29

Join Date: January 5, 2009

Recent Posts

Hi,


I have followed all the steps given in this message board in 5.1.2,5.2.2 but portlet is not deploying

I am getting the following error.

07:21:04,457 ERROR [HotDeployUtil:60] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets f
or birt-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for birt-portlet
at com.liferay.portal.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:47)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:117)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:84)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:41)
at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:92)
at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:48)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:88)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: WebReport cannot be cast to javax.portlet.Portlet
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:369)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:230)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:114)
... 21 more



What might be the problem


Thanks in advance
Tim Mi Midd
RE: how to integrate birt report
October 19, 2009 10:17 AM
Answer

Tim Mi Midd

Rank: New Member

Posts: 11

Join Date: October 16, 2009

Recent Posts

I can't get my birt portlet/app deployed, did anybody get theirs working by following the directions in the links above?
donino pienni
RE: how to integrate birt report
February 13, 2012 11:29 AM
Answer

donino pienni

Rank: Junior Member

Posts: 80

Join Date: July 2, 2011

Recent Posts

Have a look on this jsr 286 Birt Portlet project, the whole site including the reports live demo work on a standard bundle Liferay 6.1. Enjoy! emoticon
Philippe CHEIPE
RE: how to integrate birt report
February 13, 2012 11:46 AM
Answer

Philippe CHEIPE

Rank: Junior Member

Posts: 61

Join Date: August 12, 2010

Recent Posts

Perhaps try this way:
http://www.cheipe.com/java/integrer-birt-viewer-dans-une-web-app-java-3

It's an old post, but should still work.

Philippe