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

toolman

Members
  • Posts

    6
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by toolman

  1. as I reported here: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=9&id=18902#18902 It seems that iReport is still muddling the "endDateExpression" for a timePeriodSeries set - it keeps setting it to the same value as "startDateExpression", causing each datapoints interval (width) to be 0. eg: Code: ... <startDateExpression><![CDATA[$F{startdate}]]></startDateExpression> <endDateExpression><![CDATA[$F{enddate}]]></endDateExpression> ... keeps changing to Code:[code] ... <startDateExpression><![CDATA[$F{startdate}]]></startDateExpression> <endDateExpression><![CDATA[$F{startdate}]]></endDateExpression> ... every time iReport touches the jrxml. Sorry to repost, but I figured that no-one saw my original post as it was a reply to someone else with the same problem!
  2. After an afternoon wrestling I have come to the conclusion that iReport has a bug with its internal datasource handling for custom implementations of JRDataSource. I built a custom class, with a static method to return a new instantiation of the class. It correctly sets up in iReports datasource interface and 'test's OK, but when you try to build the report with iReport (PDF, JRViewer or any other) the custom class is not called and a single null row is returned on the output, not the x rows of the custom class. Note: Jasper Reports happily works with the exact same JRDatasource class outside of iReport, so it must be something to do with iReport specifically, not jasper reports. Luckily there is a simple workaround till this bug is resolved: make the custom class *also* implement JRDataSourceProvider, and make the "create" method return "this" Try a trivial example and you'll find the same thing Im sure! eg custom class: Code: public class TestGroupData implements JRDataSource, JRDataSourceProvider { int count = 0; public Object getFieldValue(JRField field) throws JRException { String fieldName = field.getName(); if (fieldName.toString().equals("value"«»)) { return new Double(10); } System.out.println("FALLTHRU" + fieldName); return null; } public boolean next() throws JRException { count++; if (count > 10) return false; return true; } public static JRDataSource createDatasource() { System.out.println("instance!"«»); return new TestGroupData(); } public JRDataSource create(JasperReport report) throws JRException { return this; } public void dispose(JRDataSource dataSource) throws JRException { // TODO Auto-generated method stub } public JRField[] getFields(JasperReport report) throws JRException, UnsupportedOperationException { // TODO Auto-generated method stub return null; } public boolean supportsGetFieldsOperation() { // TODO Auto-generated method stub return false; } }Post edited by: toolman, at: 2007/01/17 02:15
  3. Yes I want to report this bug too: It seems that iReport is muddling the "endDateExpression" for a timePeriodSeries set - it keeps getting the same value as "startDateExpression", causing each datapoints interval (width) to be 0. eg: Code: ... <startDateExpression><![CDATA[$F{startdate}]]></startDateExpression> <endDateExpression><![CDATA[$F{enddate}]]></endDateExpression> ... keeps changing to Code:[code] ... <startDateExpression><![CDATA[$F{startdate}]]></startDateExpression> <endDateExpression><![CDATA[$F{startdate}]]></endDateExpression> ...
  4. if you extend "JRAbstractChartCustomizer" you can call this.getParameterValue("paramName"); Code: public class MyChartCustomizer extends JRAbstractChartCustomizer { public void customize(JFreeChart chart, JRChart jasperChart) { Object param = this.getParameterValue("paramName"«»); } } Adding parameters has nothing to do with chart creation specifically - look at the documentation for adding a parameter to a report :) Post edited by: toolman, at: 2006/11/24 00:20
  5. hehe I have the opposite problem - my data is generally between 0.5 and 1, and the value axis isn't starting at 0 (zero). I am going to have to use a chartcustomizer class for now, and revisit it if/when the feature is added.
×
×
  • Create New...