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

aguth

Members
  • Posts

    8
  • Joined

  • Last visited

aguth's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I'm not sure what the issue is - I don't do anything special to indicate where the properties file is. I just put the properties file in the WEB-INF/classes directory, which means it will be found on the classpath. I think as long as it is on the classpath, it should be found. I keep fonts.xml in the same spot. Here is my jasperreports_extension.properties: net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.extensions.SpringExtensionsRegistryFactory net.sf.jasperreports.extension.fonts.spring.beans.resource=fonts.xml I see this line in the console output of my tomcat instance once I generate the first report (but not at webapp start time): 77047 [http-8080-Processor1] INFO xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:/C:/apache-tomcat/webapps/ReportingApp/WEB-INF/classes/fonts.xml] Make sure you have spring-beans.jar and spring-core.jar in your lib folder too.
  2. I didn't use any font mapping. I just changed the font name in my .jrxml file. <textElement> <font fontName="DejaVu Sans" size="8" isBold="true"/> </textElement> <text><![CDATA[Date & Time]]></text> Then I put the fonts.xml, jasperreports_extension.properties and all the .ttf files in the WEB-INF/classes folder of my war file. And it worked!
  3. Thanks so much, I should have seen that in the FAQ. Anyways, after switching to a TTF font and including it with the appropriate properties files, the PDF's look identical on both platforms.
  4. I was about to deploy a nice report I've been working on when I found that it renders differently in my Linux development environment than it does on my local Windows environment. I can compile it in either environment, it seems to only be different based on which server is generating the PDF. On Linux: - Some text fields are cut off on the right edge cutting off 1 or 2 characters. - The spacing between rows in the reports is too big. Is is almost like it is double spacing it instead of the nice tight spacing on Windows. My first thought was that it is using a different font, but when I save the PDF and view the Document Properties in Acrobat, I see the exact same settings. I am using the default font that iReport chooses (SansSerif/Helvetica). I have also tried this in two different Linux environments (Ubuntu/Gnome and Redhat without XWindows) with a straight copy of my whole tomcat install and webapp right off the windows box. Linux consistently renders poorly. This is a last minute blocker that is preventing me from using my report. Very sad. I have no idea what to do. Has anyone else experienced this? Thanks! Post Edited by aguth at 05/20/2009 02:00
  5. I have what I think is a similar problem. Reports are rendering differently under a Linux environment than on my local Windows environment. In particular, - some text fields are being cut short on the right edge, truncating 1 or 2 letters. - The spacing between the rows is greater on Linux (wasting space) Very strange. If I compile the report on the Linux machine and run it on Windows it renders nicely. It is just when generating the PDF on the Linux box it looks bad.
  6. That's great but looks like you'll need to use the SVN code since the fix isn't released yet. I have also gotten it working another way. Compiling with JDK1.5 but using the net.sf.jasperreports.engine.design.JRJdtCompiler compiler class instead. Seems to compile fine and then run in JDK1.4 on my server. There's mention in the docs about using a jasperreports.properties file. Mine seems to work now with or without it, but this is something else you can try if you're having a similar problem: (jasperreports.properties) org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.codegen.TargetPlatform=1.2 Code: <jrc compiler="net.sf.jasperreports.engine.design.JRJdtCompiler" destdir="${reports}"> <src> <fileset dir="${reports}"> <include name="**/*.jrxml"/> </fileset> </src> <classpath refid="classpath.jasperReport"/> </jrc>
  7. Still not working, I tried compiling the jrxml from code and that gave the same exception. OUTPUT:java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; at net.sf.jasperreports.engine.util.JRStringUtil.escapeJavaStringLiteral(JRStringUtil.java:364) at net.sf.jasperreports.engine.design.JRClassGenerator.generateInitParamsMethod(JRClassGenerator.java:339) at net.sf.jasperreports.engine.design.JRClassGenerator.generateInitParamsMethod(JRClassGenerator.java:284) at net.sf.jasperreports.engine.design.JRClassGenerator.generateClass(JRClassGenerator.java:136) at net.sf.jasperreports.engine.design.JRClassGenerator.generateClass(JRClassGenerator.java:123) at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.generateSourceCode(JRAbstractClassCompiler.java:109) at net.sf.jasperreports.engine.design.JRAbstractCompiler.createCompileUnit(JRAbstractCompiler.java:271) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:168) at Test.main(Test.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Code: Post Edited by aguth at 05/15/2009 21:17
  8. I am having trouble compiling a jasper report to run on java 1.4. The exception I get shows that it is looking for a method in the String class that was introduced in Java 1.5. Is there a workaround? I don't have the option of upgrading my jvm. java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; I am using ant with a jdk 1.4 as my JAVA_HOME. I have tried to specify a different compiler in my ant task, but it doesn't seem to make a difference. I get the same result regardless of whether or not I use the compiler attribute in the jrc task. (Not I tried using the JRJdk13Compiler class since I couldn't find one for 1.4 specifically). Here's my jrc call i my ant script (see code section) Please help! I need to get this working in 1.4. Alan Code: <jrc compiler="net.sf.jasperreports.engine.design.JRJdk13Compiler" destdir="${reports}"> <src> <fileset dir="${reports}"> <include name="**/*.jrxml"/> </fileset> </src> <classpath refid="classpath.jasperReport"/> </jrc>
×
×
  • Create New...