jeeads
Members-
Posts
12 -
Joined
-
Last visited
jeeads's Achievements
-
I am using IReports 4.5.1 and I can't seem to find information on this subject? Thanks
-
I have a field loaded with a comma delimited string, 2, 5, 10, that I want to load into a jr:list component as a vertical list, how do I do it? Thanks Jerry
-
The values I am trying to load are elements with -note-list Thanks Jerry
-
I am trying to load a jr:list using an xml datasource. The xml element used to load the associated ireport field (centcom-eqmt-note-list) has a value of [2, 10, 5]. The report field class is java.util.list and the datasetrun - datasourceexpression uses a new JRBeanCollectionDataSource($F(centcom-eqmt-note-list)). When I fill and print the report the field values are not loaded? Could someone show me how to configure this? Thanks Jerry I have added two attachments the jrxml and the xml used for loading. Thanks Jerry
-
I am building a report using an xml datasource I want to populate a jr:list using the following configuration. xml element: [10, 5, 2] report field: northcom-units-note-list report dataset: _THIS report component element: new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{northcom-units-note-list}) $F(index4) When I print the report the list doesn't seem to be populated? I know it has something to do with this configuration.
-
Thanks, I will try removing the Groovy stuff because I really don't need it. I added the groovy dependency to my pom and things began working. I believe some Jasper methods throw Groovy exceptions and that is what I was running into. Again thanks for you help.
-
java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException Native Method) Class.java:2389) Class.java:2699) Class.java:326) Class.java:308) JasperCompileManager.java:469) JasperCompileManager.java:235) JRFillDataset.java:427) JRBaseFiller.java:363) JRVerticalFiller.java:77) JRVerticalFiller.java:87) JRVerticalFiller.java:57) JRFiller.java:142) JRFiller.java:78) JasperFillManager.java:624) JasperFillManager.java:605) JasperReportExportService.java:192) at mil.dod.j8.gfm.server.service.JasperReportExportService.writeReportToStream( at net.sf.jasperreports.engine.JasperFillManager.fillReport( at net.sf.jasperreports.engine.JasperFillManager.fillReport( at net.sf.jasperreports.engine.fill.JRFiller.fillReport( at net.sf.jasperreports.engine.fill.JRFiller.createFiller( at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>( at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>( at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>( at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>( at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator( at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator( at net.sf.jasperreports.engine.JasperCompileManager.getCompiler( at java.lang.Class.newInstance( at java.lang.Class.newInstance0( at java.lang.Class.getConstructor0( at java.lang.Class.privateGetDeclaredConstructors( at java.lang.Class.getDeclaredConstructors0(
-
I have built some reports using iReports 4.5.0 and I am trying to fill them from my code. When I use JRMapCollectionDataSource the JasperFillManager.fillReport fails. The print out from the call private JRDataSource getUICforOUIDJRDataSource(){ is ################################# results count: 6 ################################# Key: object_name Value: Headquarters Department of the Army ################################# Key: ouid Value: 72060772313750347 ################################# Key: uic Value: W0ZUFF ################################# Key: object_name Value: Office of the Secretary of the Army ################################# Key: ouid Value: 72060772313750348 ################################# Key: uic Value: W00EFF ################################# Key: object_name Value: The Army Staff ################################# Key: ouid Value: 72060772313750349 ################################# Key: uic Value: WSTAFF ################################# Key: object_name Value: US Army Commands ################################# Key: ouid Value: 72060772313750350 ################################# Key: uic Value: WARCFF ################################# Key: object_name Value: US Marine Corps Commands ################################# Key: ouid Value: 72061270529933313 ################################# Key: uic Value: M10010 ################################# Key: object_name Value: Headquarters, Marine Corps ################################# Key: ouid Value: 72061270529933314 ################################# Key: uic Value: M54000 ##################################number of records: 6 so I believe the JRDataSource is loaded correctly. The parameters are correct and the compiled report is correct so why is the fill report failing? Any help would be greatly appreciated. I have attached the .jrxml that goes with the code. Code: Code:... case uic_ouid_table: pathToCompiledReportTemplate = "/jasper-reports/uicforouid.jasper"; jrDataSource = getUICforOUIDJRDataSource(); break; } Resource compiledReport = new ClassPathResource(pathToCompiledReportTemplate); Map<String,Object> params = new HashMap<String,Object>(); params.put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, "yyyy-MM-dd"); params.put(JRXPathQueryExecuterFactory.XML_NUMBER_PATTERN, "#,##0.##"); params.put(JRXPathQueryExecuterFactory.XML_LOCALE, Locale.ENGLISH); params.put(JRParameter.REPORT_LOCALE, Locale.US); params.put("REPORT_TITLE", reportTitle); JasperPrint jasperPrint = JasperFillManager.fillReport(compiledReport.getInputStream(), params, jrDataSource); private JRDataSource getUICforOUIDJRDataSource(){ JRMapCollectionDataSource datasource = null; Collection<Map<String, ?>> results = objectAliasDao.getUICForOUID(); if (results.size() > 0){ System.out.println("################################# results count: " + results.size()); for ( Map<String, ?> row : results ) { for (String key : row.keySet()) { Object value = (Object)row.get(key); System.out.println("################################# Key: " + key + " Value: " + value); } } datasource = new JRMapCollectionDataSource(results); System.out.println("##################################number of records: " + datasource.getRecordCount()); } return datasource; }
-
I have been trying to use a JRMapCollectionDataSource to filll a jasper report and it is failing and I don't know why? I am using JasperFillManager.fillReport with that data source and it fails. I have attached the .jrxml report and the code used to load it. When loading the JRMapCollectionDataSource the System.out is: ################################# results count: 6 ################################# Key: object_name Value: Headquarters Department of the Army ################################# Key: ouid Value: 72060772313750347 ################################# Key: uic Value: W0ZUFF ################################# Key: object_name Value: Office of the Secretary of the Army ################################# Key: ouid Value: 72060772313750348 ################################# Key: uic Value: W00EFF ################################# Key: object_name Value: The Army Staff ################################# Key: ouid Value: 72060772313750349 ################################# Key: uic Value: WSTAFF ################################# Key: object_name Value: US Army Commands ################################# Key: ouid Value: 72060772313750350 ################################# Key: uic Value: WARCFF ################################# Key: object_name Value: US Marine Corps Commands ################################# Key: ouid Value: 72061270529933313 ################################# Key: uic Value: M10010 ################################# Key: object_name Value: Headquarters, Marine Corps ################################# Key: ouid Value: 72061270529933314 ################################# Key: uic Value: M54000 ##################################number of records: 6 so I believe the datasource is loading correctly. But the fillReport fails. When I pass a JRXmlDataSource the fillReport works just fine? I have attached the .jrxml that is being filled. Any help would be greatly appreciated. Code:... case uic_ouid_table: pathToCompiledReportTemplate = "/jasper-reports/uicforouid.jasper"; jrDataSource = getUICforOUIDJRDataSource(); break; } Resource compiledReport = new ClassPathResource(pathToCompiledReportTemplate); Map<String,Object> params = new HashMap<String,Object>(); params.put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, "yyyy-MM-dd"); params.put(JRXPathQueryExecuterFactory.XML_NUMBER_PATTERN, "#,##0.##"); params.put(JRXPathQueryExecuterFactory.XML_LOCALE, Locale.ENGLISH); params.put(JRParameter.REPORT_LOCALE, Locale.US); params.put("REPORT_TITLE", reportTitle); JasperPrint jasperPrint = JasperFillManager.fillReport(compiledReport.getInputStream(), params, jrDataSource); private JRDataSource getUICforOUIDJRDataSource(){ JRMapCollectionDataSource datasource = null; Collection<Map<String, ?>> results = objectAliasDao.getUICForOUID(); if (results.size() > 0){ System.out.println("################################# results count: " + results.size()); for ( Map<String, ?> row : results ) { for (String key : row.keySet()) { Object value = (Object)row.get(key); System.out.println("################################# Key: " + key + " Value: " + value); } } datasource = new JRMapCollectionDataSource(results); System.out.println("##################################number of records: " + datasource.getRecordCount()); } return datasource; }
-
I have build some reports using iReports 4.5.0 and I am trying to fill them from my code. When I use JRMapCollectionDataSource the JasperFillManager.fillReport fails. The print out from the call private JRDataSource getUICforOUIDJRDataSource(){ is ################################# results count: 6 ################################# Key: object_name Value: Headquarters Department of the Army ################################# Key: ouid Value: 72060772313750347 ################################# Key: uic Value: W0ZUFF ################################# Key: object_name Value: Office of the Secretary of the Army ################################# Key: ouid Value: 72060772313750348 ################################# Key: uic Value: W00EFF ################################# Key: object_name Value: The Army Staff ################################# Key: ouid Value: 72060772313750349 ################################# Key: uic Value: WSTAFF ################################# Key: object_name Value: US Army Commands ################################# Key: ouid Value: 72060772313750350 ################################# Key: uic Value: WARCFF ################################# Key: object_name Value: US Marine Corps Commands ################################# Key: ouid Value: 72061270529933313 ################################# Key: uic Value: M10010 ################################# Key: object_name Value: Headquarters, Marine Corps ################################# Key: ouid Value: 72061270529933314 ################################# Key: uic Value: M54000 ##################################number of records: 6 so I believe the JRDataSource is loaded correctly. The parameters are correct and the compiled report is correct so why is the fill report failing? Any help would be greatly appreciated. I have attached the .jrxml that goes with the code. Code: case uic_ouid_table: pathToCompiledReportTemplate = "/jasper-reports/uicforouid.jasper"; jrDataSource = getUICforOUIDJRDataSource(); break; } Resource compiledReport = new ClassPathResource(pathToCompiledReportTemplate); Map<String,Object> params = new HashMap<String,Object>(); params.put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, "yyyy-MM-dd"); params.put(JRXPathQueryExecuterFactory.XML_NUMBER_PATTERN, "#,##0.##"); params.put(JRXPathQueryExecuterFactory.XML_LOCALE, Locale.ENGLISH); params.put(JRParameter.REPORT_LOCALE, Locale.US); params.put("REPORT_TITLE", reportTitle); JasperPrint jasperPrint = JasperFillManager.fillReport(compiledReport.getInputStream(), params, jrDataSource); private JRDataSource getUICforOUIDJRDataSource(){ JRMapCollectionDataSource datasource = null; Collection<Map<String, ?>> results = objectAliasDao.getUICForOUID(); if (results.size() > 0){ System.out.println("################################# results count: " + results.size()); for ( Map<String, ?> row : results ) { for (String key : row.keySet()) { Object value = (Object)row.get(key); System.out.println("################################# Key: " + key + " Value: " + value); } } datasource = new JRMapCollectionDataSource(results); System.out.println("##################################number of records: " + datasource.getRecordCount()); } return datasource; }
-
More information, my application uses springframework 3.0.6, springframework.security 3.0.5 and hibernate 3.3.2. The classes.jar includes all of the configuration files mentioned and it on the ireports class pathh. Thanks Jerry
-
I am trying to configure my report in iReport to use a spring loaded hibernate connection datasource and it just doesn't seem to work? I have added my classes.jar to the class path but when I do and set my configuration for my applicationContext.,xml I get an error saying the imports in my configuration are not working. What am I missing? I have attached my applicationContext.xml and the three .xml files that are being imported. Thanks Jerry