amitchechare Posted June 6, 2018 Share Posted June 6, 2018 I am getting an exception( Exception in thread "main" java.lang.ClassCastException: net.sf.jasperreports.engine.data.JRBeanCollectionDataSource cannot be cast to java.lang.Boolean ) while creating a report(Bar Grap) in iReport. I am passing JRBeanCollectionDataSource object through map as follow.1st I have created POJO class then created object of that POJO class inserted them in a list. Then created JRBeanCollectionDataSource from that list as followJRBeanCollectionDataSource chartDataSource = new JRBeanCollectionDataSource(list);and passing that parameter through hashmap HashMap<String, Object> parameters = new HashMap<String, Object>(); parameters.put("chartDataSource", chartDataSource); In iReports I have created parameter with name="chartDataSource" and type="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource" created fields as created in the POJO (All fields are of String type).But while generating Graph in iReport getting exception "Exception in thread "main" java.lang.ClassCastException: net.sf.jasperreports.engine.data.JRBeanCollectionDataSource cannot be cast to java.lang.Boolean "Please help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now