Jump to content
JasperReports Library 7.0 is now available ×

xmlDatasource emptx fields


Berrada

Recommended Posts

Hi,

 

I have a problem with empty fields while using an xml datasource.

ireport throws a Nullpointerexception if the fieldtype for example BigDecimal or Date but no data found in the xmlDatasource.

-----------------------------------

 

xmlDatasource:

<copaBonusPayOut>10,00</copaBonusPayOut>

<copaBonusSpecial></copaBonusSpecial>

 

-----------------------------------

 

<field name="copaBonusPayOut" class="java.math.BigDecimal">

</field>

 

<field name="copaBonusSpecial" class="java.math.BigDecimal">

</field>

 

 

 

java.lang.NullPointerException at net.sf.jasperreports.engine.data.JRXmlDataSource.convertStringValue(JRXmlDataSource.java:340) at net.sf.jasperreports.engine.data.JRXmlDataSource.getFieldValue(JRXmlDataSource.java:317) at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:813) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:777) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1412) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:891) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:123) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:420) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:256) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:1049) at java.lang.Thread.run(Unknown Source)

 

 

is there any work around?

 

Thanks.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...