Jump to content
We've recently updated our Privacy Statement, available here ×

hybris0

Members
  • Posts

    6
  • Joined

  • Last visited

hybris0's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I still don't know. never used sub reports before but after a quick test the problem seems the same because i have to put them in title because detail band is not rendered if your subreport do not depend on a query on the master report. Anyway i found a trick: 1- put the stuff in the detail band 2- pass an empty datasource of size 1 as REPORT_DATA_SOURCE This way the detail band is rendered once and all headers and footer are where they should be and the table in it spand acrooss the needed page. Quite unintuitive but i finnaly found the way.
  2. AFAIK the only way to layout correctly a table is to put it in the title band The problem arises when the table contains enough data to need more pages In that case the title band is stretched and the table is correctly rendered on multiple pages but the page footer is printed only in the last page. How to solve this? My objective is to create a report that contains multiple tables and charts populated by different datasources. Should i switch to subreports and forget about tables?
  3. finally i got it the table must not be in the detail band as that band is rendered only when REPORT_DATA_SOURCE is filled probably i should have read a bit more docs but the demo example is very very poor
  4. ok it seems i have 2 problems here: 1) i am using variables instead of fields (i took inspiration from the demo example) 2) if i set my own datasource parameter i get no data, if use REPORT_DATA_SOURCE parameter i get the data correctly rendered This last point i think it's in contrast with the table target usage because it means i cannot have more than one table in the report. Also i think the demo example is highly misleading on how to use tables.
  5. Hi all again, I banged my head again and again on this this, checked the example row by row to see if something different is done but i cannot find where is the error. Can someone please send me a working report and relative java code used to populate it? Maybe you have something simple enough to be shared. Thanks
  6. Hi i am trying to do a simple report using the Table element. I think i carefully followed the example code provided with the code distribution of version 3.7.4 Anyway when i render my report i always get No data. I tried to debug and it seems that the DataSource is never called. Attached you can find the report XML. This is the code used to fill the report: List<TheData> tdl = getTheData();Vector<HashMap> dati = new Vector<HashMap>();for(TheData td : tdl) { HashMap<String, Object> hm = new HashMap<String, Object>(); hm.put("phase", td.getPhase())); hm.put("product", td.getProoduct()); dati.add(hm);}JRMapCollectionDataSource ds = new JRMapCollectionDataSource(dati);Map<String, Object> params = new HashMap<String, Object>();params.put("TableDataSource", ds);JasperReport jr = (JasperReport) JRLoader.loadObject(getClass().getResource("/myjasper/sintesi_periodo.jasper"));JasperPrint jp = JasperFillManager.fillReport(jr, params); This is the debug output from jasper: 2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.ExtensionsEnvironment (ExtensionsEnvironment.java:77) - Instantiating extensions registry class net.sf.jasperreports.extensions.DefaultExtensionsRegistry2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:129) - Loading registries for cache key sun.misc.Launcher$AppClassLoader@f4a24a2010-09-20 12.07.18: DEBUG net.sf.jasperreports.engine.util.JRLoader (JRLoader.java:692) - Found resource jasperreports_extension.properties at jar:file:/home/marcopar/progetti/PTrack3Commons/dist/lib/jasperreports-3.7.4.jar!/jasperreports_extension.properties in classloader sun.misc.Launcher$AppClassLoader@f4a24a2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:157) - Loading JasperReports extension properties resource jar:file:/home/marcopar/progetti/PTrack3Commons/dist/lib/jasperreports-3.7.4.jar!/jasperreports_extension.properties2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:207) - Instantiating registry of type net.sf.jasperreports.extensions.DefaultExtensionsRegistryFactory for property net.sf.jasperreports.extension.registry.factory.default2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:232) - Instantiating extensions registry for default using factory class net.sf.jasperreports.extensions.DefaultExtensionsRegistryFactory2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:207) - Instantiating registry of type net.sf.jasperreports.governors.GovernorExtensionsRegistryFactory for property net.sf.jasperreports.extension.registry.factory.governor2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:232) - Instantiating extensions registry for governor using factory class net.sf.jasperreports.governors.GovernorExtensionsRegistryFactory2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:207) - Instantiating registry of type net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory for property net.sf.jasperreports.extension.registry.factory.components2010-09-20 12.07.18: DEBUG net.sf.jasperreports.extensions.DefaultExtensionsRegistry (DefaultExtensionsRegistry.java:232) - Instantiating extensions registry for components using factory class net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory2010-09-20 12.07.19: DEBUG net.sf.jasperreports.engine.fill.JRBaseFiller (JRBaseFiller.java:378) - Fill 29087107: created for sintesi_periodo2010-09-20 12.07.19: DEBUG net.sf.jasperreports.engine.fill.JRBaseFiller (JRBaseFiller.java:879) - Fill 29087107: filling report2010-09-20 12.07.19: DEBUG net.sf.jasperreports.engine.fill.JRVerticalFiller (JRVerticalFiller.java:140) - Fill 29087107: no data2010-09-20 12.07.19: DEBUG net.sf.jasperreports.engine.fill.JRVerticalFiller (JRVerticalFiller.java:216) - Fill 29087107: no pages2010-09-20 12.07.19: DEBUG net.sf.jasperreports.engine.fill.JRBaseFiller (JRBaseFiller.java:952) - Fill 29087107: ended
×
×
  • Create New...