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

godbole

Members
  • Posts

    13
  • 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 godbole

  1. Hi, I was wondering if there is any limitation on the length and breadth of a graph charted using Jasper Reports? So, if I just want to display a bar chart (not print), for example, can the bar chart be made scrollable horizantally and vertically to any length? If yes, then could these graphs be designed using iReports? Thanks, Raj
  2. Hi Raman, I've solved this problem (sort of), so that now 99% of the time, I do not get a null pointer exception. Here is what I did, In iReport, go to View > Toolbars > Memory. This turns on a button-like memory toolbar. Clicking on this toolbar, forces garbage collection to occur freeing up some memory and possibly some locks on files that were opened in that session (this is my guess). So I make it a habit to frequently run the garbage collect especially before closing the file and before opening a new one. This is also the first thing I do after starting up iReport. I found that this has considerably reduced the null pointers (99% things work fine now) and if there is still a null pointer, just close iReport and reopen after 15 mins or so (make sure to force garbage collection before closing and after opening). The file usually is not damaged, its just some sort of a lock on it that stops the file from opening in another application too. Hope this helps! Rajeshwari
  3. Hello, You may have already gotten the answer to this as this is an old post but for rotation on X axis, use Label rotation under common properties for the chart. The value is in degrees so a setting of 90 will result in vertically placed labels on x axis. Hope this helps!
  4. The field I'm querying to get the date is of type DATE in the Oracle database. iReport reads it as Timestamp and I've also tried changing the type in iReport to java.util.Date but still get the same error. I don't know if this is related but Oracle's way of interpreting date fields is a bit of a mystery to me. For instance, I have two tables that have date fields in them yet a select statement on one table such as: SELECT * FROM TABLE_STAT WHERE INTERVAL_STARTDATE >= '1-SEP-08' and INTERVAL_STARTDATE <= '30-SEP-08'; works fine but the same statement does not work on the second table with the exact same field and data! I get an empty result set with no error so I've to use something like this: SELECT * FROM TABLE2_STAT WHERE to_date(INTERVAL_STARTDATE,'dd-mm-yy') >= '01-SEP-08' and to_date(INTERVAL_STARTDATE,'dd-mm-yy') <= '30-SEP-08'; The above second format is what the chart uses. I'm wondering if this is what is messing up the chart. Another thing is is that for a time range of six months the chart is shown fine but not for a month or less of data. My problem is that the date range is gotten dynamically from a web app so I cannot predict what it'll be! Please help if anyone has any idea. Thanks! Post Edited by Rajeshwari Godbole at 01/21/09 16:22
  5. Hello, Very often I get a null pointer exception (pasted below), when opening files. If I close iReport (v3.1.1) and open the file in some other viewer and after some time open iReport again, the file opens up! I cannot understand what is going on... this happens even if I've properly saved files and closed iReport. Also sometimes when closing iReport, it shows me a dialog box that some files are unsaved even when I've no files open. I'm perplexed by this problem... Please help!! The following is the stack trace from the null pointer: Error loading the report template Message: net.sf.jasperreports.engine.JRException: java.lang.NullPointerException Level: SEVERE Stack Trace: java.lang.NullPointerException net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:80) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:485) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Error at line 204 char 19: null org.apache.commons.digester.Digester.createSAXException(Digester.java:2919) org.apache.commons.digester.Digester.createSAXException(Digester.java:2945) org.apache.commons.digester.Digester.startElement(Digester.java:1364) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) org.apache.commons.digester.Digester.parse(Digester.java:1647) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:80) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:485) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Many thanks!
  6. Hello, I'm trying to create a timeseries chart for a report that looks like the example given below. The data is retrieved from an Oracle database, where the time axis values come from a date field. The query selects data for a month. When I try to select Day as the Time Period (as this is what I want the plotting by), I'm getting a "null 'period' argument" error. The settings for the timeseries chart are shown in the attached images Please help! The report looks like: Application: ABC Date Total Msgs Total Bytes ============================= Sept 10 . . Sept 30 =============================Application:XYZ Date Total Msgs Total Bytes ============================= Sept 1 . . Sept 30 ============================= The error I get on the TimeSeries chart is: Error filling print... Null 'period' argument. java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(Unknown Source) at javax.swing.SwingUtilities.invokeAndWait(Unknown Source) at com.jaspersoft.ireport.designer.compiler.prompt.Prompter.promptForParameters(Prompter.java:259) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:731) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Caused by: java.lang.NullPointerException at com.jaspersoft.ireport.designer.compiler.prompt.Prompter$1.run(Prompter.java:65) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) java.lang.IllegalArgumentException: Null 'period' argument. at org.jfree.data.time.TimeSeries.addOrUpdate(TimeSeries.java:693) at net.sf.jasperreports.charts.fill.JRFillTimeSeriesDataset.customIncrement(JRFillTimeSeriesDataset.java:150) at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:179) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:152) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:682) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:888) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:791) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:890) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Print not filled. Try to use an EmptyDataSource...
  7. I tried adding a dataset before also just like you mention but could not get the chart to work. I tried it again just now and it works like a charm! Thanks! The timeseries chart gives me an error when the period is set to Day. Funnily enough this works for a colleague of mine on his database. I've included the error below. I'll also put this in a new thread as you suggested. ErrorÂfillingÂprint...ÂNullÂ'period'Âargument. java.lang.reflect.InvocationTargetException ÂÂÂÂatÂjava.awt.EventQueue.invokeAndWait(UnknownÂSource) ÂÂÂÂatÂjavax.swing.SwingUtilities.invokeAndWait(UnknownÂSource) ÂÂÂÂatÂcom.jaspersoft.ireport.designer.compiler.prompt.Prompter.promptForParameters(Prompter.java:259) ÂÂÂÂatÂcom.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:731) ÂÂÂÂatÂorg.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) ÂÂÂÂatÂorg.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) CausedÂby:Âjava.lang.NullPointerException ÂÂÂÂatÂcom.jaspersoft.ireport.designer.compiler.prompt.Prompter$1.run(Prompter.java:65) ÂÂÂÂatÂjava.awt.event.InvocationEvent.dispatch(UnknownÂSource) ÂÂÂÂatÂjava.awt.EventQueue.dispatchEvent(UnknownÂSource) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpOneEventForHierarchy(UnknownÂSource) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpEventsForHierarchy(UnknownÂSource) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpEvents(UnknownÂSource) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpEvents(UnknownÂSource) ÂÂÂÂatÂjava.awt.EventDispatchThread.run(UnknownÂSource) java.lang.IllegalArgumentException:ÂNullÂ'period'Âargument. ÂÂÂÂatÂorg.jfree.data.time.TimeSeries.addOrUpdate(TimeSeries.java:693) ÂÂÂÂatÂnet.sf.jasperreports.charts.fill.JRFillTimeSeriesDataset.customIncrement(JRFillTimeSeriesDataset.java:150) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:179) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:152) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:682) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:888) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:791) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) ÂÂÂÂatÂcom.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:890) ÂÂÂÂatÂorg.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) ÂÂÂÂatÂorg.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Print not filled. Try to use an EmptyDataSource... Thanks again for all your help!
  8. Hello, I created a .jrxml report template in iReports that is using an Oracle database to retrieve data. Now I want to plug in this report into a existing webapp using the Struts2 plugin. The webapp uses JDBC to connect to the database. I'm not able to figure out what value to use for the datasource param in the struts.xml (<param name="dataSource">???</param>) so that when I click on view report on the GUI, the compiled report template from the location param would be called and the data from the Oracle database given in the datasource param would be used to generate the report. I already have the SQL written in the report template and want some way of just passing the Oracle connection to the .jasper file. Any help is much appreciated! Thanks!
  9. Hello, I'm new to Jasper Reports and have the following two questions: 1. I created a report template that is using an Oracle database to retrieve data. Now I want to plug in this report into a existing webapp using the Struts2 plugin. The webapp uses JDBC to connect to the database. I'm not able to figure out what value to use for the datasource param in the struts.xml (<param name="dataSource">???</param>) so that when I click on view report on the GUI, the compiled report template from the location param would be called and the data from the Oracle database given in the datasource param would be used to generate the report. 2. I'm trying to pass date as a parameter to the report. Can you pass dynamic parameters to compiled report templates (.jasper)? I think you can but I'm not sure. Please help! Many Thanks!
  10. hmmm... wonder if this is a bug with the image upload function of the forum.. this time I'm sure I uploaded 2 different images.. the image name is also changed and maybe overwriting the earlier uploaded images, maybe ther's a limit on the image name (although the names were not that big, the biggest was TimeSeriesSettings1.jpg) oh well.. here is the third one of the chart... sorry for the multiple posts on this!
  11. Somehow the same image has gotten uploaded thrice.... here's another try...
  12. Bulut, Thanks for the suggestion. I tried time series but am not able to get it to display correctly. I've tried many things among the first was the exact options which work for the line chart. Please find attached images for the chart settings and the chart that shows up. Please help! I cannot find any documentation on how to set time series values correctly. Matt, The date field type is set as java.util.date (by default it gets set to timestamp but I'm changing it to date). In the database it is as type date and not string. I've set the order by to date first and then application and the increment group is set to the date group but yet the chart takes the first value it finds in the first application group. Another thing I tried that seems to work is subreports. I defined a subreport with just the chart in it and order by date only and embedded that in the main report that was ordered by application and that seems to work but this seems to be a complicated way of acheiving something that should be quite simple!
  13. Hello, I'm new to JasperReports and currently generating a report grouped on application listing the date, total messages and total bytes for each application. The groups are listed alphabetically. I'm also creating a line chart on the same data that has date on the category (X) axis, messages on the value (Y) axis and applications as the series. The report generates fine but on the chart the date on the category axis is not in the logical order. This seems to be because the first application in the report has no data for the first 10 days of the month so the chart starts plotting from Sep 10 and goes till the 30th, then plots Sep. 1 through Sep. 9 (that too is not all in order). How do I sort or order the date on the X axis? Given below is an example of the report: Application: ABC Date Total Msgs Total Bytes ============================= Sept 10 . . Sept 30 =============================Application:XYZ Date Total Msgs Total Bytes ============================= Sept 1 . . . Sept 30 ============================= An image of the chart is attached for your reference. Any help is greatly appreciated! Thanks!
×
×
  • Create New...