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

travega

Members
  • Posts

    7
  • Joined

  • Last visited

travega'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. So does anyone have ANY input on this or do I need a premium account to get a reply here?!! Post Edited by travega at 07/26/2012 02:17
  2. So in short NO this did not work!! From everything that I have tried the only way to get support for multiple character sets dynamically in Jasper seems to be with one whopper font library that supports the characters you need. I am really hoping I am wrong becase this has so many limitations not least of which is the fact that a single ttf library only support around 35k characters and to support all character sets you are looking at c.1million characters. So what I have tried so far: Configuring 2 styles in my jrxml template pointing to 2 different font extensions (1 x chinese, 1x latin/cyrillic). I set the chinese font-based style as the default and the other I set as style on my fields. The assumption was that, at PDF render time, jasper would select the font for each glyph independently (i.e. use iText's automatic FontSelector feature). I was wrong :( I did the same 2 style setup as before but set the style property in the latin/cyrillic font-based style to point to the chinese font-based style. The assumption was that by providing a reference from 1 style to a default fall back style that Jasper would recognise the link and select the font for each glyph independently (i.e. use iText's automatic FontSelector feature). I was wrong :( I configured the export fonts properties in the extention JAR's xml file (as per my previous post). The assumption here was that if the fallback fonts were configured at the font extension level then there was no requirement to configure individual styles for each font in the jrxml template - all that would be required would be the setting of the font in the individual fields in the template and then Japser would be able to select the font for each glyph independently (i.e. use iText's automatic FontSelector feature). I was wrong :( I set up one font extension for a ttf library that supported CJK, latin, cyrillic, Arabic etc. (Arial Unicode MS) and deployed that with Jasper. This worked :) But the license for the font would cost $5k+ :( Back to the drawing board.iText does support automatic font selection based on each independent glyph. I refure to believe that Jasper has overlooked this VITAL feature. I mean it is very reasonable to assume that there are scenarios where many languages could appear together in an single field. Does anyone know of a mechanism/configuration in Jasper that provides the effects of dynamic font selection for a field?
  3. I have exactly the same requirement and can't seem to get it to work. What I am going to try is export the three fonts (1 for english, 1 for chinese and 1 for japanese) as separate font extensions but in my english font extension jar define that fallback fonts to be chinese and japanese like this: <exportFonts> <export key="net.sf.jasperreports.html">'Arial', SimSun, MS Gothic</export> <export key="net.sf.jasperreports.xhtml">'Arial', SimSun, MS Gothic</export></exportFonts> So if a given unicode character does not exist in the Arial font then it will hopefully then try to find it in the SimSun font or MS Gothic if it is not it either Arial or SimSun. Then once the font extension JARs are created I'm goint to create a style in my report template and set the font to the Arial font extension I have created. Then apply this to all fields in the report template. I'm not sure if it will work but if anyone has feedback on whether this is likely to work that would be super helpful. I will post my findings once I have tested it myself.
  4. Can you provide your JRXml so we can see what you're doing?
  5. Awesome thanks. Oh and sorry for the late reply I haven't been in the forum for a long time ;)
  6. Today I upgraded from JRL 4.5.0 to JRL 4.5.1 and I am now having an issue with NullPointerException errors being thrown while trying to export to an XLS. I don't even know where to start looking for this issue as the exception gives very little indication as to the source of the issue. When I run the same template in iReports 4.5.1 with the XML datasource it renders fine so I am wondering if something in the export parameters has changed?? Below is a sample of the code I use to fill the JRPrint resource and how I export it. below that is the exception I am seeing. If anyone can help me here I would be very grateful...! Code: for(File file : tempJRPrintDirectory.listFiles()) { file.delete(); } tempJRPrintDirectory.delete(); } catch (Exception e) { throw new ReportingException(e); } /************* * EXCEPTION * *************/ 2012-05-17 13:08:02,658 ERROR [com.reporting.ejb3.renderreport.RenderReportBean] (pool-27-thread-4) Error while trying to render report: 'testReport'. Stack tr$ at net.sf.jasperreports.engine.export.JRXlsExporter.exportText(JRXlsExporter.java:618) [:4.5.1] at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:1066) [:4.5.1] at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:864) [:4.5.1] at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:559) [:4.5.1] at com.reporting.ejb3.renderreport.RenderReportBean.createXls(RenderReportBean.java:273) [:] at com.reporting.ejb3.renderreport.RenderReportBean.execute(RenderReportBean.java:91) [:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_24] at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) [jboss-aop.jar:2.2.1.GA] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72) [:1.1.3] at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76) [:1.1.3] at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62) [:1.1.3] at sun.reflect.GeneratedMethodAccessor552.invoke(Unknown Source) [:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_24] at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174) [jboss-aop.jar:2.2.1.GA] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:74) [:1.1.3] at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_1535366669.invoke(InvocationContextInterceptor_z_fillMethod_1535366669.java) [$ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90) [:1.1.3] at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_1535366669.invoke(InvocationContextInterceptor_z_setup_1535366669.java) [:] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.async.impl.interceptor.AsynchronousServerInterceptor.invoke(AsynchronousServerInterceptor.java:128) [:1.7.17] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62) [:1.7.17] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) [:1.7.17] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) [:1.7.17] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA] [/code] Post Edited by travega at 05/17/2012 02:17
  7. Hey, I have been trying to find a solution to a very simple scenario but cannot find how to do it... So I thought I would come right to the source and see if anyone can point me in the right direction. I wan to have a text field that looks something like this: "Your current employer, | $F{employerName} |, will contact you soon." Whereby the employerName is not of fixed width and all subsequent text is pushed right accordingly. Now I know that you cannot stretch horizontally but is there a way that you can perhaps embed dynamic width text inside a static text filed and set the width of the field good and wide? Or is the only way to do it by adding the static text around your dynamic text in your datasource? I am using XML as my data source and I could add the static text around the dynamic text there but I would like to avoid this for a number of reasons. Thanks in advance for any suggestions
×
×
  • Create New...