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

jbuberel

Members
  • Posts

    38
  • 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 jbuberel

  1. I've developed a very simple custom chart theme named 'altostheme' (filename: altostheme.jrctx). Inside my report JRXML, the them is referenced as: <chart renderType="svg" theme="altostheme"> The them was developed using iReports-ng v.3.5.2, and then 'exported' into a JAR file (altostheme.jar), which was placed into the iReports-ng root installation directly. When executed from within iReports-nb v3.5.2, everything works correctly. I am now trying to fill the report programatically, and I am getting this stack trace: [java] 2009-07-19 23:22:15 INFO main - Starting generation for spec [50d35da8204a899901204a89a2470001] [java] 2009-07-19 23:22:40 ERROR main - Generic expection thrown during report fill for JASPER file: /home/jason/svn/branches/mywebpage/reports/one_page_themed/one_page_primary_mf.jasper of 50d35da8204a899901204a89a2470001 of customer 52417680 [java] net.sf.jasperreports.engine.JRRuntimeException: Chart theme 'altostheme' not found. [java] at net.sf.jasperreports.charts.util.ChartUtil.getChartTheme(ChartUtil.java:169) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRFillChart.evaluateChart(JRFillChart.java:1277) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRFillChart.evaluateRenderer(JRFillChart.java:1252) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRFillChart.evaluate(JRFillChart.java:1241) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:260) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:486) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1427) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:729) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:256) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:114) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:911) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:814) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) [jasperreports-javaflow.jar:na] [java] at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421) [jasperreports-javaflow.jar:3.5.2] [java] at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:251) [jasperreports-javaflow.jar:3.5.2] [java] at com.altosresearch.report.ReportGenerationMgr.fillReport(ReportGenerationMgr.java:411) [classes/:na] I have attempted to add to the JRPropertyMap: JRProperties.setProperty("net.sf.jasperreports.xml.chart.theme.altostheme", "/full/path/to/altostheme.jrctx"); But although the JRXML file compiles correctly, it fails to find the theme during fill-time. So my questions is: What steps should I be taking to inform the report filler of the proper location of either the 'altostheme.jrctx' or the packaged 'altostheme.jar' file at runtime? Thanks, Jason
  2. Just in case anyone out there would like to see how we were able to create a report - using only standard JasperReports v3.5.2 and iReport v3.5.2 without any custom code - that uses a remote XML data feed as a data source for chart generation: http://blog.altosresearch.com/use-xml-data-source-for-chart-generation-in-jasperreports/ This does involve some clever use of JRXmlDataSource and JRLoader classes, but can all be done within the iReport tool directly. The coolest part is the use of report field values as parameters to the XML service URL to allow the remote web service API to return data specific to the details band of the report. Hope this helps others, Jason
  3. In fact, here is a complete HOWTO and tutorial on how to make this work, complete with parameterized remote URLs: http://blog.altosresearch.com/use-xml-data-source-for-chart-generation-in-jasperreports/ -jason
  4. I am using iReports v3.5.2. I have successfully tested the use of a remote XML data source and XPath2 query as the primary query for a test report. This works without any problems. Haveing established the ability to use a remote XML URL as a data source, I would now like to create a report that uses an SQL query as the primary data source, and in turn uses a remote XML data source for a chart placed into the details band. The group parameter of my primary SQL query is ZIP code, and each detail chart will contain a set of timeseries data related to that ZIP code (historical price values). I have defined a report dataset named 'xml_dataset' and set the query language for this as 'XPath2'. I now need to bind that XML dataset query to my chart. In the screenshot attached, you see the Chart Details dialog, which I need to specify the datasource for my chart. What I am trying to figure out is: What is the expression that I would use to bind the chart to the 'xml_dataset' (defines two fields from an XPath expression: 'date' and 'c1') to a remote XML datasource that uses the ZIP code from the report-level SQL query:/uploads/projects/ireport/greenshot_2009-07-13_19-38-37.png http://server.net/get/chart/data?zip= which returns the XML that the 'xml_dataset' XPath query expects: <data> <row date="2009-03-20" c1="$631,023" /> <row date="2009-03-27" c1="$641,369" /> <row date="2009-04-03" c1="$656,561" /> <row date="2009-04-10" c1="$671,488" /> <row date="2009-04-17" c1="$687,984" /> <row date="2009-04-24" c1="$706,753" /> <row date="2009-05-01" c1="$724,792" /> <row date="2009-05-08" c1="$741,014" /> <row date="2009-05-15" c1="$753,726" /> <row date="2009-05-22" c1="$761,806" /> <row date="2009-05-29" c1="$771,441" /> <row date="2009-06-05" c1="$779,833" /> <row date="2009-06-12" c1="$787,525" /> <row date="2009-06-19" c1="$794,756" /></data>[/code] Any hints or suggestions? Post Edited by jbuberel at 07/14/2009 04:03
  5. Thank you so much for the warning! The md5sum of the file I downloaded yesterday: 3cfdebf3498b49b3215a2b14543760c3 The md5sum of the file I downloaded just now: ac437a07f5d73838383f7c7583763d13 I then restored the following 3 lines in my jasperreports.properties file: net.sf.jasperreports.compiler.class = net.sf.jasperreports.engine.design.JRJavacCompiler net.sf.jasperreports.compiler.classpath = @REPORTS_JASPER_DIR@:@REPORTS_JASPER_CLASSPATH@/jasperreports.jar:@REPORTS_JASPER_CLASSPATH@/ireport.jar:@REPORTS_JASPER_CLASSESDIR@ net.sf.jasperreports.compiler.temp.dir = ${java.io.tmpdir} I also added back these two command line parameters to my java command line: -Dnet.sf.jasperreports.compiler.class=net.sf.jasperreports.engine.design.JRJavacCompiler -Djasper.reports.compiler.class=net.sf.jasperreports.engine.design.JRJavacCompiler And I can now verify that everything works correctly again. Side question: Was looking through the configuration documentation, and it seems as though: net.sf.jasperreports.compiler.class=net.sf.jasperreports.engine.design.JRJavacCompiler has been deprecated and replace with: net.sf.jasperreports.compiler.java=net.sf.jasperreports.engine.design.JRJavacCompiler Is that correct? Although I cannot exactly recall why I placed this parameter in both my .properties file AND on the command line. Seems redundant. -jason
  6. To answer my own question/problem: I had to remove the following from my Java launch command: -Dnet.sf.jasperreports.compiler.class=net.sf.jasperreports.engine.design.JRJavacCompiler -Djasper.reports.compiler.class=net.sf.jasperreports.engine.design.JRJavacCompiler With these two parameters removed, report filling completed successfully.
  7. WIthout any modifications to libraries or JRXML, I just went from JR3.1.4 -> JR3.5, and now I get: [java] 2009-03-26 16:45:39 ERROR main - Error during report filling using JASPER file: /home/jason/reports/jasper/mf_broker_market_update_primary.jasper to generate JasperPrint object ff808081182d4f6c01182d505a7d12a0 of customer 49555281 [java] net.sf.jasperreports.engine.JRException: Could not load object from location : /home/jason/reports/jasper/mf_broker_title_page.jasper [java] at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:271) [jasperreports.jar:na] [java] at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:324) [jasperreports.jar:na] However, the .jasper file it claims it cannot load is definitely present: > ls -la /home/jason/reports/jasper/mf_broker_title_page.jasper -rw-r--r-- 1 jason jason 30928 2009-03-26 16:16 /home/jason/reports/jasper/mf_broker_title_page.jasper jason@bunny ~/s/b/jlb> Was there a change introduced in v3.5 that might be at the root of this? An upgraded library dependency, perhaps? -jason
  8. In my case, these exceptions were being caused by uncaught exceptions being thrown from within a custom chart scriptlet referenced by the JRXML file. The chart scriptlet was throwing a NullPointerException that was not being caught or logged. This appears to send the interrupt signal to the thread that Jasper has created to perform the sub-report filling work. I tracked it down by wrapping my entire scriptlet's invocation with a try/catch Throwable and then narrowed down the offending code from there. Hope this information helps, Jason
  9. Thank you for the tip - we had assumed that the font names inside our 'arial.ttf' file (from the MSTT Core Fonts Distribution) were simply named 'Arial', but we were wrong. I used the open source 'FontForge' tool to open the TTF files only to discover that the actual font name is 'Arial-MT'. Regards, jason
  10. Hello there- Looking for some advice on how to further troubleshoot some layout sizing/spacing differences that I am experiencing when generating the same report on two different Linux servers. The generation code, jrxml, and input data are all identical. The JavaVM used when exporting to PDF is the same (bea-jdk, but the problem is seen on sun and ibm jdks as well). Server 1: RedHat Enterprise Server v3.0 (XFree86) Server 2: RedHat Enterprise Server v4.0 (x.org) I have verified that the problem is not caused by font substitution differences. I did this by replacing the font (currently Arial) temporarily with a TTF that is definitely not provided by the X11 server on either machine (Gentium). The results were always the same. Here is what the 'correct' version should look like (note the words 'market update' on the title line): http://www.altosresearch.com/sample.pdf Here is the 'incorrect' version, note that the title line is missing the word 'update': http://www.altosresearch.com/sample2.pdf When opening the raw PDF data, I can see (after the normal preamble portions) some very minor differences in the dimensions of some regions: Correct: Code:7 0 obj<</Border[0 0 0]/Rect[295 78.37 379.88 86.37]/Subtype/Link/C[0 0 1]/A<</S/URI/URI(http://www.altosresearch.com)>>>> Incorrect: Code:[code]7 0 obj<</Border[0 0 0]/Rect[295 78.4 379.88 86.4]/Subtype/Link/C[0 0 1]/A<</S/URI/URI(http://www.altosresearch.com)>>>> One guess is that this had something to do with the DPI difference between the two X11 servers running on each machine. Note, however, that I am using the 'headless' jvm argument, so I didn't think that would make any difference. Any suggestions on where I should look next? Regards, jason Post edited by: jbuberel, at: 2006/11/22 05:34
×
×
  • Create New...