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

keats76

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

Security Advisories

Downloads

Everything posted by keats76

  1. keats76

    Strings

    Try this: ($F{VORNAME} == null : "" : $F{VORNAME} + " ") + ($F{NACHNAME} == null : "" : $F{NACHNAME})
  2. keats76

    scriptlet

    Yeah, I ran into the same problem ... I figured that by placing it in the same directory as the report files it would be picked up in the classpath. Unfortunately, that wasn't the case (not sure why). Anyway, within iReport you can add your jar file to the classpath. Go to Tools -> Options -> Classpath tab. Then click on the "Add Jar" button and reference your file. That should do the trick. As a side note, my report are being used in SugarCRM (via ZuckerReports). When I uploaded my JAR with my report files, everything compiled just fine on the server (all in the same classpath). In other words, you could probably get your class files picked up by updating your machine classpath to include the location of your new jar file as well. Good luck! Mike
  3. try something like: $F{AMOUNT1}==null?"":$F{AMOUNT1}.toString()+"n"+ instead ...
  4. keats76

    scriptlet

    I just went through the scriplet hassel myself. How are you calling your scriptlet? First, I couldn't get my scriptlet to work from the "scriplets" section on iReport. I had to reference the class file from the "Scriptlet class" parameter on the report properties window. 1) Make sure you use the fully qualified name when referencing your class (e.g. com.myreports.myClass instead of myClass). 2) Import the following classes in your java code (you'll need to add the jasperreports-3.1.4.jar to your classpath) import net.sf.jasperreports.engine.JRDefaultScriptlet; import net.sf.jasperreports.engine.JRScriptletException; extend the following class JRDefaultScriptlet 3) If not using the built in methods (e.g. afterReportInit() etc.), access your methods via the global report scriptlet like: $P{REPORT_SCRIPTLET}.testMethod(0) That should do it. I'm new to JasperReports, but I feel pretty experienced now that I've had to put about 10 reports together for a new CRM installation. There are some wonderful features in the iReport/Jasper combo, but for a product that is as mature as this, there are too many bugs for my taste. I've spent more time troubleshooting parameter passing, variable grouping, text formatting, and scriptlet issues than I have creating actual reports. Oh well, I guess I can't complain ... it is free after all! :) Good luck, Mike
  5. All, I'm using iReport 3.1.4 and I'm having an issue with the text formatting. iReport will let me "Center" my text in the horizontal, and it will let me render and save a report with these settings. However, when I close out of the report and reopen it, I receive a SAX Parser error telling me that "null" is not a valid option and that "Center, Left, Right" should be used instead (note that this is not the exact error). When I take a peek into the XML I see that the textalign property on my fields is set to "null". This is the obvious problem. The XML is not valid. I changed each of the "null" entries to "Center". This made the XML valid, and removed the errors, but now my text is no longer centered!!! Ugh. Anyway, has anyone else seen this? Thanks, Mike
×
×
  • Create New...