You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bruce Phillips <ph...@hotmail.com> on 2008/07/12 20:15:48 UTC
Struts2 - JasperReport Plugin - Subreport Problem
I'm having a problem getting the Struts2 JasperReport plugin to work when my JasperReport main report uses a sub-report.
I can get the the plugin to work fine
with a JasperReport that doesn't use a subreport. But when I add
a sub-report to the main report that uses an new
JRBeanCollectionDataSource as the datasource expression I get an error:
javax.servlet.ServletException: javax.servlet.ServletException: Error evaluating expression :
Source text : new JRBeanCollectionDataSource($F{phones})
The JasperReport main and sub-report works fine in iReport.
Any help would be greatly appreciated.
Bruce
_________________________________________________________________
It’s a talkathon – but it’s not just talk.
http://www.imtalkathon.com/?source=EML_WLH_Talkathon_JustTalk
RE: Struts2 - JasperReport Plugin - Subreport Problem
Posted by "@rju" <na...@gmail.com>.
hi
you should add the class of that phones field as
"org.apache.struts2.views.jasperreports.ValueStackDataSource" instead of
"java.lang.String".
it will solve ur problem.
but my problem is i am unable to find the populated list in the sub report.
am using ireport 3.7.0
but in the example project is running and generating the report successfully
--
View this message in context: http://old.nabble.com/Struts2----JasperReport-Plugin---Subreport-Problem-tp18422217p30866755.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts2 - JasperReport Plugin - Subreport Problem
Posted by Bruce Phillips <ph...@hotmail.com>.
Thanks to some great help from Dave Newton, I was able to figure out how to use Struts2, JasperReports, a main report and a sub-report in my web application.
I blogged about how I got it all to work here:
http://tinyurl.com/5h7nvv
on my blog at http://www.brucephillips.name/blog
In that blog entry you can download a complete war file with source code including the .jrxml files.
Bruce
> From: phillips1021@hotmail.com
> To: user@struts.apache.org
> Subject: Struts2 - JasperReport Plugin - Subreport Problem
> Date: Sat, 12 Jul 2008 13:15:48 -0500
>
> I'm having a problem getting the Struts2 JasperReport plugin to work when my JasperReport main report uses a sub-report.
>
> I can get the the plugin to work fine
> with a JasperReport that doesn't use a subreport. But when I add
> a sub-report to the main report that uses an new
> JRBeanCollectionDataSource as the datasource expression I get an error:
>
> javax.servlet.ServletException: javax.servlet.ServletException: Error evaluating expression :
> Source text : new JRBeanCollectionDataSource($F{phones})
>
>
> The JasperReport main and sub-report works fine in iReport.
>
> Any help would be greatly appreciated.
>
> Bruce
> _________________________________________________________________
> It’s a talkathon – but it’s not just talk.
> http://www.imtalkathon.com/?source=EML_WLH_Talkathon_JustTalk
_________________________________________________________________
Making the world a better place one message at a time.
http://www.imtalkathon.com/?source=EML_WLH_Talkathon_BetterPlace