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

torost

Members
  • Posts

    11
  • 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 torost

  1. I have started to look into this again. Is there anyone that can give some hints to how to add support for a query executer in the new, netbeans based, generation of IReport? I would also be prepared to donate the code of the query executer in order to have it permanently included with the product.
  2. I had a look at the new IReports 3.1.0 NB since we consider migrating to the new version. However I am missing a feature for adding a new custom Query Executer factory. Many of my reports is dependant on a custom query executer factory so this feature is essential to me. Is there any means of registering a new Query Executer factory in IReports 3.1.0 NB? It does not matter if it set over a system property or over a menu entry, I just need to know that I can continue to use this feature. What is the current stat of the NB version of IReports? Does it cover all features of Jasper Reports 3.1.0, or earlier versions of IReports for that matter? Kind Regards, Torbjörn Österdahl
  3. "Report no Pages" usually indicates that your query did not return any results. With the default settings Jasper Reports won't generate any report then since there are no data. You can override this behaviour under Report Properties to produce a blank page. .. besides that, this is perhaps not the right thread for general questions on using the product. Torbjörn Österdahl [www.ultra-marine.org]
  4. Three points to consider: 1. The DataSource passed over using the $P{REPORT_DATA_SOURCE} needs to be of the type JRDataSource 2. The 'standard' implementation of JRDataSource, JDBCJRDataSource is not rewindable. This means that you can read it only once from the start to the end. If a record have been read once it can not be used again in a sub report. 3. In IReports, If you add an datasource expression make sure that you also change the drop down field from 'Connection Expression' to 'Data Source Expression.' If you saw no other errors I would expect that your particular problem is 2.
  5. I improved (i hope) the solution in two aspects: 1. By creating a new Range using the min/max of the existing ranges. By doing that I am not dependent on which range is bigger etc. 2. In my case I had an XYPlot, so I generalized the code to work also for this Plot. public void customize(JFreeChart chart, JRChart jasperChart) { // Get the plot Plot plot = chart.getPlot(); ValueAxis rangeAxis1; ValueAxis rangeAxis2; if (plot instanceof XYPlot) { // Get the second Y axis rangeAxis2 = (ValueAxis) ((XYPlot) plot).getRangeAxis(1); // Get the first Y axis rangeAxis1 = (ValueAxis) ((XYPlot) plot).getRangeAxis(0); } else if (plot instanceof CategoryPlot) { // Get the second Y axis rangeAxis2 = (ValueAxis) ((CategoryPlot) plot).getRangeAxis(1); // Get the first Y axis rangeAxis1 = (ValueAxis) ((CategoryPlot) plot).getRangeAxis(0); } else { // nothing to do return; } // Get the range of the second axis Range range2 = rangeAxis2.getRange(); // Get the range of the first axis Range range1 = rangeAxis1.getRange(); // Use the same range for the two axis double lower = (range1.getLowerBound()<range2.getLowerBound())?range1.getLowerBound():range2.getLowerBound(); double upper = (range1.getUpperBound()>range2.getUpperBound())?range1.getUpperBound():range2.getUpperBound(); Range commonRange = new Range(lower, upper); rangeAxis1.setRange(commonRange); rangeAxis2.setRange(commonRange); } Torbjörn Österdahl, http://www.ultra-marine.org Post edited by: torost, at: 2007/10/16 16:22
  6. Cool, it actually was as simple as that. Find the code for rendering a chart using the XYStepRenderer below. Torbjörn Code: /** * */ package net.infonic.jr.chartcustomizer; import org.jfree.chart.JFreeChart; import org.jfree.chart.renderer.xy.XYStepRenderer; import net.sf.jasperreports.engine.JRChart; import net.sf.jasperreports.engine.JRChartCustomizer; /** * @author Torbjörn Österdahl, Infonic AG */ public class SteppedXYChartCustomizer implements JRChartCustomizer { /** (non-Javadoc) * @see net.sf.jasperreports.engine.JRChartCustomizer#customize(org.jfree.chart.JFreeChart, net.sf.jasperreports.engine.JRChart) */ public void customize(JFreeChart chart, JRChart jasperChart) { XYStepRenderer xyStepRenderer = new XYStepRenderer(); chart.getXYPlot().setRenderer(xyStepRenderer); } }
  7. Could anyone give a hint to what it would involve to use a new renderer from the JFreeCharts library that is so far not supported in Jasper Reports and IReports. I really need the XYStepRenderer to migrate our reports to Jasper Reports. Would it pay off to simply create a JRChartCustomizer to replace the renderer instantiated by Jasper Reports, or do I need to create a Plot class as well? Any background information is appreciated before I dwelve to deep into this myself. Torbjörn www.ultra-marine.org
  8. See previous post. Post edited by: torost, at: 2007/09/07 15:46
  9. I created a Jasper Report extensions for retrieving all information sets of a multi-result set stored procedure, cache the result and make it possible to retrieve any result set by index. The solution is as is, unsupported with no liability for whatever outcome of using it, but it might serve as a starting point for someone. The jar contains source as well as class files. The solution, including source packaged into the jar, is now available from the link [url=http://www.infonic.net/infonic_202.shtml]http://www.infonic.net/infonic_202.shtml Post edited by: torost, at: 2007/09/07 15:45
  10. I am glad that you published this fix, however why not add another default property for the original datasource similar to the 'REPORT_DATASOURCE'? Another possible fix would be to add a method to the JRSortableDataSource to return the original. Similar to the original post on this thread I have created my own datasource to deal with particular features of my db, however this does not work if I ever want to sort the results on the front end.
  11. I ran into this issue myself, but was helped by this post. The key issue seem to be that the classpath element is needed for the taskdef as well as the target where the task is used. In the first case the jasper report jar will do (the compiled ant task alone not), in the second case all dependencies referenced from the report implementation is needed including i.e. jfreechart.
×
×
  • Create New...