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

Otto Hahn

Members
  • Posts

    10
  • 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 Otto Hahn

  1. I am amazed that no one is answering this specific question. So I try it myself: create a jasperreports.properties file in the root path of the project: # loads/override properties from default.jasperreports.propertiesnet.sf.jasperreports.default.pdf.font.name=net/sf/jasperreports/fonts/dejavu/DejaVuSans.ttfnet.sf.jasperreports.default.pdf.embedded=true[/code] or change the default font by adding this Method and call it before export to PDF/A: public void setDefaultPdfFontEmbedded() { JasperReportsContext jasperReportsContext = DefaultJasperReportsContext.getInstance(); jasperReportsContext.setProperty("net.sf.jasperreports.default.pdf.font.name", "net/sf/jasperreports/fonts/dejavu/DejaVuSans.ttf"); jasperReportsContext.setProperty("net.sf.jasperreports.default.pdf.embedded", "true");}[/code]Please correct me if this is not true!
  2. I'm using JasperReports Studio 6.3.1 and for coding jasperreports-6.3.1.jar, jasperreports-font.6.3.1.jar, itext-2.1.7.js5.jar I tried to export a very simple report to PDF/A, witch is only using DejaVu Sans Font from the library. The Preview looks like this: I get this Exeption: com.lowagie.text.pdf.PdfXConformanceException: All the fonts must be embedded. This one isn't: Helvetica at com.lowagie.text.pdf.internal.PdfXConformanceImp.checkPDFXConformance(Unknown Source) at com.lowagie.text.pdf.PdfWriter.addSimple(Unknown Source) at com.lowagie.text.pdf.PdfContentByte.setFontAndSize(Unknown Source) at com.lowagie.text.pdf.PdfDocument.writeLineToContent(Unknown Source) at com.lowagie.text.pdf.ColumnText.go(Unknown Source) at com.lowagie.text.pdf.ColumnText.go(Unknown Source) at net.sf.jasperreports.engine.export.JRPdfExporter.writePageAnchor(JRPdfExporter.java:1000) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:912) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:537) at openkv.jasperreports.demo.FontExtensionDemo.exportToPdfA(FontExtensionDemo.java:48) at openkv.jasperreports.demo.FontExtensionDemo.runDemo(FontExtensionDemo.java:40) at openkv.jasperreports.demo.FontExtensionDemo.main(FontExtensionDemo.java:32)</pre>[/code]The Java Source: package openkv.jasperreports.demo;import java.io.File;import java.net.URL;import org.apache.log4j.BasicConfigurator;import org.apache.log4j.Level;import org.apache.log4j.Logger;import net.sf.jasperreports.engine.JRDataSource;import net.sf.jasperreports.engine.JREmptyDataSource;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JasperFillManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.engine.export.JRPdfExporter;import net.sf.jasperreports.export.SimpleExporterInput;import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput;import net.sf.jasperreports.export.SimplePdfExporterConfiguration;import net.sf.jasperreports.export.type.PdfaConformanceEnum;public class FontExtensionDemo { private final static String ICC_FILE = "/openkv/framework/jasperreports/engine/export/sRGB_v4_ICC_preference.icc"; private final static String reportName = "SimpleFontExtension"; public static void main(String[] args) { BasicConfigurator.configure(); Logger.getRootLogger().setLevel(Level.DEBUG); FontExtensionDemo demo = new FontExtensionDemo(); try { demo.runDemo(); } catch (Throwable e) { e.printStackTrace(); } } public void runDemo() throws Throwable { JasperPrint jasperPrint = fillReport(); exportToPdfA(jasperPrint); } private void exportToPdfA(JasperPrint jasperPrint) throws JRException { JRPdfExporter exporter = new JRPdfExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput("H:" + reportName + ".pdf")); exporter.setConfiguration(this.getPdfAExporterConfiguration()); exporter.exportReport(); } private SimplePdfExporterConfiguration getPdfAExporterConfiguration() { SimplePdfExporterConfiguration exporterConfiguration = new SimplePdfExporterConfiguration(); exporterConfiguration.isTagged(); exporterConfiguration.setPdfaConformance(PdfaConformanceEnum.PDFA_1A); exporterConfiguration.setIccProfilePath(getClass().getResource(ICC_FILE).getPath()); return exporterConfiguration; } private JasperPrint fillReport() throws JRException { JRDataSource dataSource = new JREmptyDataSource(1); return JasperFillManager.fillReport(getSourceFileName(), null, dataSource); } private String getSourceFileName() { String reportBasePath = "/openkv/jasperreports/demo/report"; URL reportResource = FontExtensionDemo.class.getResource(reportBasePath + "/FontExtension/" + reportName + ".jasper"); return new File(reportResource.getPath()).getAbsolutePath(); }}[/code] The Report Source: <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.3.1.final using JasperReports Library version 6.3.1 --><!-- 2017-06-16T11:09:44 --><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="SimpleFontExtension" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="33b3b27b-bc99-4208-a8fc-1f05d77efd89"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <queryString> <![CDATA[]]> </queryString> <background> <band splitType="Stretch"/> </background> <detail> <band height="103" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="550" height="41" uuid="57a35ef2-2c45-4e6a-a302-9c3b083e2bcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="34" isBold="true" isItalic="false" isUnderline="true"/> </textElement> <text><![CDATA[DejaVu Sans Font Demo]]></text> </staticText> <staticText> <reportElement key="" x="68" y="46" width="52" height="19" uuid="cd391c43-485c-4415-a71d-81930765738d"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="true" isUnderline="false"/> </textElement> <text><![CDATA[bold]]></text> </staticText> <staticText> <reportElement key="" x="68" y="65" width="52" height="19" uuid="18fa45fa-2346-4d7d-8447-f76261754fef"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="false" isItalic="true" isUnderline="false"/> </textElement> <text><![CDATA[italic]]></text> </staticText> <staticText> <reportElement key="" x="68" y="84" width="52" height="19" uuid="76f3ac47-7018-4227-8de7-34a9a9f3a603"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="false" isItalic="false" isUnderline="false"/> </textElement> <text><![CDATA[Normal]]></text> </staticText> <staticText> <reportElement key="" x="130" y="46" width="110" height="19" uuid="65aae4f2-58c1-446a-941f-657fd7887916"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[bold Underline]]></text> </staticText> <staticText> <reportElement key="" x="130" y="65" width="110" height="19" uuid="d2c5cbbd-d088-40b8-a1bc-fa68156dbf07"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="false" isItalic="true" isUnderline="true"/> </textElement> <text><![CDATA[italic Underline]]></text> </staticText> <staticText> <reportElement key="" x="130" y="84" width="110" height="19" uuid="0859e64f-c9fd-4286-9303-cf76182b4734"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="false" isItalic="false" isUnderline="true"/> </textElement> <text><![CDATA[Normal Underline]]></text> </staticText> <staticText> <reportElement key="" x="250" y="46" width="80" height="19" uuid="1af0605b-9669-42f9-af2c-41990708c7f8"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="true" isItalic="true" isUnderline="false"/> </textElement> <text><![CDATA[bold Italic]]></text> </staticText> <staticText> <reportElement key="" x="340" y="46" width="150" height="19" uuid="fddc7585-5d20-4599-b64c-fd7859018020"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="DejaVu Sans" size="12" isBold="true" isItalic="true" isUnderline="true"/> </textElement> <text><![CDATA[bold Italic Underline]]></text> </staticText> </band> </detail></jasperReport>[/code]If I export the Report without this line: exporterConfiguration.setPdfaConformance(PdfaConformanceEnum.PDFA_1A);[/code]I can see the unembedded Helvetica Font: I don't need or use this font in my report. How can I turn off this.
  3. New installation of the JasperReports Server with this run script jasperreports-server-cp-6.2.1-linux-x64-installer.run with default settings on SUSE Linux Enterprise 11. The only one I have changed is the port of the Apache Tomcat. On serverside (localhost Firefox ESR 38.7.0 ) everything works. Outside this server on a workstation logon OK. On IE all reports comes with the installation run correctly. On Firefox ESR 38.3.0 I get an Exception: Please help! Fehlermeldung Exception occurred rendering view org.springframework.web.servlet.view.JstlView: name 'modules/viewReport/reportOutput'; URL [/WEB-INF/jsp/modules/viewReport/reportOutput.jsp] Ablaufverfolgung für Fehler java.lang.IllegalStateException: Exception occurred rendering view org.springframework.web.servlet.view.JstlView: name 'modules/viewReport/reportOutput'; URL [/WEB-INF/jsp/modules/viewReport/reportOutput.jsp] at org.springframework.webflow.mvc.view.AbstractMvcView.render(AbstractMvcView.java:191) at org.springframework.webflow.engine.ViewState.render(ViewState.java:296) at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:186) at org.springframework.webflow.engine.State.enter(State.java:194) at org.springframework.webflow.engine.Transition.execute(Transition.java:227) at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393) at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214) at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119) at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555) at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388) at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210) at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105) at org.springframework.webflow.engine.State.enter(State.java:194) at org.springframework.webflow.engine.Transition.execute(Transition.java:227) at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393) at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214) at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119) at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555) at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388) at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210) at org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:232) at org.springframework.webflow.engine.ViewState.resume(ViewState.java:196) at org.springframework.webflow.engine.Flow.resume(Flow.java:545) at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:261) at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169) at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy82.resumeExecution(Unknown Source) at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183) at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855) at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at com.jaspersoft.jasperserver.api.security.IPadSupportFilter.doFilter(IPadSupportFilter.java:67) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.common.JSSwitchUserProcessingFilter.doFilter(JSSwitchUserProcessingFilter.java:157) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.NullFilter.doFilter(NullFilter.java:43) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:143) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:99) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:217) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.NullFilter.doFilter(NullFilter.java:43) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:217) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:57) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.api.security.JSCsrfGuardFilter.doFilter(JSCsrfGuardFilter.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.doFilter(WebAppSecurityFilter.java:80) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.MultipartRequestWrapperFilter.doFilter(MultipartRequestWrapperFilter.java:95) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.war.NullFilter.doFilter(NullFilter.java:43) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at com.jaspersoft.jasperserver.api.security.encryption.EncryptionFilter.doFilter(EncryptionFilter.java:150) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.util.SessionDecoratorFilter.doFilter(SessionDecoratorFilter.java:63) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.httpheaders.ResourceHTTPHeadersFilter.doFilter(ResourceHTTPHeadersFilter.java:77) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.P3PFilter.doFilter(P3PFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:618) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.NullPointerException at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:721) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264) at org.springframework.webflow.mvc.servlet.ServletMvcView.doRender(ServletMvcView.java:50) at org.springframework.webflow.mvc.view.AbstractMvcView.render(AbstractMvcView.java:187) ... 144 more Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.NullPointerException at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:901) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:834) at org.apache.jsp.WEB_002dINF.jsp.modules.viewReport.reportOutput_jsp._jspService(reportOutput_jsp.java:97) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) ... 163 more Caused by: java.lang.NullPointerException at com.jaspersoft.jasperserver.war.tags.JasperViewerTag.doEndTag(JasperViewerTag.java:200) at org.apache.jsp.WEB_002dINF.jsp.modules.viewReport.reportOutput_jsp._jspx_meth_js_005fjasperviewer_005f0(reportOutput_jsp.java:132) at org.apache.jsp.WEB_002dINF.jsp.modules.viewReport.reportOutput_jsp._jspService(reportOutput_jsp.java:82) ... 166 more
  4. Thank you hozawa, change from SELECT DISTINCT "DB_DEVELOPER"."T_123456789"."VAL_FFIELD"FROM "DB_DEVELOPER"."T_123456789"[/code]to SELECT DISTINCT VAL_FFIELDFROM "$P!{DB}"."$P!{TABLE}"[/code]The SQL statement now is dynamic. http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/thumbs_up.gif
  5. JasperReport jasperReport = JasperCompileManager.compileReport(reportFilePath.getAbsolutePath());JRDataset dataset = jasperReport.getMainDataset();JRQuery query = dataset.getQuery();for (JRQueryChunk chunk : query.getChunks()) { System.out.println(chunk.getText());}[/code]In this context it's not possible to change anything. My goal only would be to replace the db- and the tablenanme.
  6. How to change the database and table names in a report or subreport in my code? Examples: SELECT DISTINCT "DB20154"."REGISTER_TABLE"."VAL_FFIELD"FROM "DB20154"."REGISTER_TABLE"[/code]change to SELECT DISTINCT "DB20116"."REGISTER_TABLE"."VAL_FFIELD"FROM "DB20116"."REGISTER_TABLE"[/code]or SELECT DISTINCT "DB_DEVELOPER"."T_123456789"."VAL_FFIELD"FROM "DB_DEVELOPER"."T_123456789"[/code] SELECT DISTINCT "DB_CUSTOMER"."T_163258984"."VAL_FFIELD"FROM "DB_CUSTOMER"."T_163258984"[/code]
  7. Thank you. Now I can see the expression editor dialog.
  8. I have installed the plugin in Mars.1 Eclipse. Installation without any error. But if I press a button to open the expression editor nothing happens. What have I to do?
  9. Hello, I create a subreport with some data from a database table with a JDBC-Connection. The data can be changed with a parameter (p_sub). Now I want use this subreport in a mainreport. The mainreport also has a parameter (p_main). I join the parameter (p_sub) from the subreport with the parameter (p_main) from the mainreport. But if there is no connection in the mainreport I do not see the data of the subreport. How can I perform a subreport with it's own connection and without any datasource connection in the mainreport?
×
×
  • Create New...