lotfi.rhaimy Posted March 26, 2019 Share Posted March 26, 2019 jasperPrintDesignPlanning = JasperFillManager.fillReport(jasperReport, paramsDesignPlanning,jr); Exception : (java.lang.StringIndexOutOfBoundsException) java.lang.StringIndexOutOfBoundsException: String index out of range: -2 Link to comment Share on other sites More sharing options...
hozawa Posted March 26, 2019 Share Posted March 26, 2019 You have an error in your report, in your program, or in the setting.That's about all I can say with the information you've provided. There's just too many causes that results in StringIndexOutOfBoundsException. Link to comment Share on other sites More sharing options...
lotfi.rhaimy Posted March 26, 2019 Author Share Posted March 26, 2019 thanks for your replay , i don't think about settings because this setting normal woks with another information this is the funtion from JasperFillManger :public static JasperPrint fillReport( JasperReport jasperReport, Map parameters, JRDataSource dataSource ) throws JRException { return JRFiller.fillReport(jasperReport, parameters, dataSource); }and there are paramters : 1- jasperReport = JasperCompileManager.compileReport(jasperDesign);2- Map<String, Object> paramsDesignPlanning = LauncherReport.buildParameterMap(session, parameterReport.getParameterBaseReport(), parameterReport.getParameterComplementaire());3- JRBeanCollectionDataSource jr =new JRBeanCollectionDataSource(lstVacationDesignPlanningReportBean); Link to comment Share on other sites More sharing options...
C-Box Posted March 28, 2019 Share Posted March 28, 2019 What's about the FULL STACKTRACE here and not just a snippet from the error itself to trace down the error!?!regards C-Box Link to comment Share on other sites More sharing options...
hozawa Posted March 31, 2019 Share Posted March 31, 2019 Try setting parameter to be an empty HashMap and also set datasource to be "New JREmptyDataSource()" 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