dzrmail Posted April 11, 2022 Share Posted April 11, 2022 Guys, good morningI'm having a problem compiling my report and I can't find a solution.Sorry for using Google Translator...I need to use subreport and when I try to create the datasource expression, the error appears. I'm using the following expression:new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{areaETipoPlantio}.getMensagemCertificadoString())However, the following error appears:The constructor JRBeanCollectionDataSource(String) is undefined value = new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource(((br.gov.mg.meioambiente.cplanentidades.model.vo.AreaETipoPlantioVO)parameter_areaETipoPlantio.getValue()).getMensagemCertificadoString()); //$JR_EXPR_ID=21$However, if I put only the expression $P{areaETipoPlantio}.getMensagemCertificadoString() the report compiles normally.I wanted to know if this is normal and if my subreport would work. I still don't have access to the Java source code to test.Thanks. Link to comment Share on other sites More sharing options...
dzrmail Posted April 11, 2022 Author Share Posted April 11, 2022 Folks,I made the following change and the report compiled:new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource( (Collection) $P{areaETipoPlantio}.getMensagemCertificadoString()). Link to comment Share on other sites More sharing options...
simo.shred Posted August 31, 2023 Share Posted August 31, 2023 Why downvote @dzrmail that's what worked for me!!! thanks champ 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