PDA

View Full Version : JasperReportsMultiFormatView



springfanatic
Aug 23rd, 2005, 09:53 AM
I'm using JasperReportsMultiFormatView, when I try to render the pdf file I get the following error. please help. in the database table the name of the field is AM_1, so that is correct so I'm confused with the message "No such property"

javax.servlet.ServletException: Error retrieving field value from bean : AM_1
org.springframework.web.servlet.FrameworkServlet.s erviceWrapper(FrameworkServlet.java:402)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:346)
javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)


root cause

net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : AM_1
net.sf.jasperreports.engine.data.JRBeanCollectionD ataSource.getFieldValue(JRBeanCollectionDataSource .java:126)
net.sf.jasperreports.engine.fill.JRBaseFiller.next (JRBaseFiller.java:872)
net.sf.jasperreports.engine.fill.JRVerticalFiller. fillReport(JRVerticalFiller.java:116)
net.sf.jasperreports.engine.fill.JRBaseFiller.fill (JRBaseFiller.java:622)
net.sf.jasperreports.engine.fill.JRFiller.fillRepo rt(JRFiller.java:116)
net.sf.jasperreports.engine.JasperFillManager.fill Report(JasperFillManager.java:428)
org.springframework.web.servlet.view.jasperreports .AbstractJasperReportsView.fillReport(AbstractJasp erReportsView.java:565)
org.springframework.web.servlet.view.jasperreports .AbstractJasperReportsView.renderMergedOutputModel (AbstractJasperReportsView.java:507)
org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:928)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:705)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:625)
com.dhl.kpi.tts.web.servlet.CustomDispatcherServle t.doService(CustomDispatcherServlet.java:35)
org.springframework.web.servlet.FrameworkServlet.s erviceWrapper(FrameworkServlet.java:386)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:346)
javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

totoliso
Jan 30th, 2008, 01:20 PM
Hi, i'm having the same error with jasper reports, did you solve the problem?

Bye

dr_pompeii
Jan 30th, 2008, 03:43 PM
ok whe have a situation

read both carefull this

example
with ireport you create some file called my
TestJasperReport.jrxml
ok in this file you should have written some sql query right?
and according of the amount of tables included in such query you will see
that each variable for each table is created in the .jrxml
(just open and see with a simple editor)



<field name="idProveedor" class="java.lang.String"/>
<field name="razon" class="java.lang.String"/>
<field name="ruc" class="java.lang.String"/>
<field name="direccion" class="java.lang.String"/>
<field name="email" class="java.lang.String"/>
<field name="telefonouno" class="java.lang.String"/>
<field name="telefonodos" class="java.lang.String"/>


now the trick is this for for Spring, (i work in this way)
just make a simple copy of TestJasperReport.jrxml called TestJasperReportSpring.jrxml
the unique difference is that the tag <queryString> must be deleted
and the query must be in your java code

i think that the rest of you is already resolved, but anyway i ask
how you fill your JRBeanCollectionDataSource???

some code is useful

regards

mfons
Sep 19th, 2008, 10:12 AM
I just migrated to Jasper Reports 3.0.0.

I discovered that I would get this error if I filled a description in for a field. We don't put the sql in the jrxml file; we use the "fill" command in Java.

But the field element definition cannot have a description subelement, or I get this error. Hope this helps someone.