<div>Hello Folks,</div><div> </div><div>I use birtengine v4.3.0 for my project. I try to add hyperlink in my report. </div><div> </div><div>First I tried to add it on table items but it didn't work:</div><div> </div><div>
<pre class="_prettyXprint">RowHandle tabledetail = (RowHandle) table.getDetail().get(0);for (int i = 0; i < cols.length; i++) {CellHandle cell = (CellHandle) tabledetail.getCells().get(i);DataItemHandle data = designFactory.newDataItem("data_"+ (String) cols[i]);ActionHandle actionHandle = data.setAction(StructureFactory.createAction()); actionHandle.setURI("http://www.google.com/");actionHandle.setLinkType(DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK);actionHandle.setTargetWindow("_self");data.setResultSetColumn((String) cols[i]);cell.getContent().add(data);}</pre></div><div>Then I tried on a simple label : </div><div> </div><div>
<pre class="_prettyXprint">LabelHandle label = designFactory.newLabel( null );label.setText(title); ActionHandle actionHandle = label.setAction(StructureFactory.createAction()); actionHandle.setURI("http://www.google.com/");actionHandle.setLinkType(DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK);actionHandle.setTargetWindow("_self");</pre></div><div>and the result is the same, an Exception is thrown when the line </div><div><strong>actionHandle.setURI("<a data-ipb='nomediaparse' href='
http://www.google.com/'>http://www.google.com/");</a></strong></div><div>is added; when I comment it the code works (but there's no hyperlink :P)</div><div> </div><div>the exception thrown is the following :</div><div> </div><div>
<div>
<blockquote class="ipsBlockquote">
<div>org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.</div><div>at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2360)</div><div>at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:277)</div><div>at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)</div><div>at fi.reporting.ReportServlet.doPost(ReportServlet.java:807)</div><div>at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)</div><div>at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)</div><div>at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)</div><div>at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)</div><div>at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)</div><div>at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)</div><div>at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)</div><div>at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)</div><div>at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)</div><div>at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)</div><div>at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)</div><div>at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)</div><div>at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)</div><div>at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)</div><div>at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)</div><div>at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)</div><div>at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</div><div>at java.lang.Thread.run(Unknown Source)</div><div><strong>Caused by: org.mozilla.javascript.EvaluatorException: Unexpected end of file (<inline>#1)</strong></div><div>at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)</div><div>at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)</div><div>at org.mozilla.javascript.Parser.addError(Parser.java:146)</div><div>at org.mozilla.javascript.Parser.reportError(Parser.java:160)</div><div>at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2465)</div><div>at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955)</div><div>at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813)</div><div>at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)</div><div>at org.mozilla.javascript.Parser.addExpr(Parser.java:1723)</div><div>at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)</div><div>at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)</div><div>at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)</div><div>at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)</div><div>at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)</div><div>at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)</div><div>at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)</div><div>at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)</div><div>at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)</div><div>at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)</div><div>at org.mozilla.javascript.Parser.expr(Parser.java:1523)</div><div>at org.mozilla.javascript.Parser.statementHelper(Parser.java:1246)</div><div>at org.mozilla.javascript.Parser.statementHelper(Parser.java:1232)</div><div>at org.mozilla.javascript.Parser.statement(Parser.java:707)</div><div>at org.mozilla.javascript.Parser.parse(Parser.java:401)</div><div>at org.mozilla.javascript.Parser.parse(Parser.java:338)</div><div>at org.mozilla.javascript.Context.compileImpl(Context.java:2368)</div><div>at org.mozilla.javascript.Context.compileString(Context.java:1359)</div><div>at org.mozilla.javascript.Context.compileString(Context.java:1348)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:240)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:1)</div><div>at java.security.AccessController.doPrivileged(Native Method)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:236)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:1)</div><div>at org.eclipse.birt.core.script.ScriptContext.compile(ScriptContext.java:148)</div><div>at org.eclipse.birt.report.engine.executor.ExecutionContext.compile(ExecutionContext.java:779)</div><div>at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:713)</div><div>at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluateString(ReportItemExecutor.java:297)</div><div>at org.eclipse.birt.report.engine.executor.ReportItemExecutor.processAction(ReportItemExecutor.java:440)</div><div>at org.eclipse.birt.report.engine.executor.LabelItemExecutor.execute(LabelItemExecutor.java:63)</div><div>at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)</div><div>at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)</div><div>at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)</div><div>at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)</div><div>at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)</div><div>at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)</div><div>at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:258)</div><div>at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)</div><div>... 20 more</div><div>nov. 27, 2013 5:04:50 PM org.apache.catalina.core.StandardWrapperValve invoke</div><div>SEVERE: Servlet.service() for servlet [ReportServlet] in context with path [/ReportServlet] threw exception [org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.] with root cause</div><div>org.mozilla.javascript.EvaluatorException: Unexpected end of file (<inline>#1)</div><div>at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)</div><div>at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)</div><div>at org.mozilla.javascript.Parser.addError(Parser.java:146)</div><div>at org.mozilla.javascript.Parser.reportError(Parser.java:160)</div><div>at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2465)</div><div>at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955)</div><div>at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813)</div><div>at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)</div><div>at org.mozilla.javascript.Parser.addExpr(Parser.java:1723)</div><div>at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)</div><div>at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)</div><div>at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)</div><div>at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)</div><div>at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)</div><div>at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)</div><div>at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)</div><div>at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)</div><div>at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)</div><div>at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)</div><div>at org.mozilla.javascript.Parser.expr(Parser.java:1523)</div><div>at org.mozilla.javascript.Parser.statementHelper(Parser.java:1246)</div><div>at org.mozilla.javascript.Parser.statementHelper(Parser.java:1232)</div><div>at org.mozilla.javascript.Parser.statement(Parser.java:707)</div><div>at org.mozilla.javascript.Parser.parse(Parser.java:401)</div><div>at org.mozilla.javascript.Parser.parse(Parser.java:338)</div><div>at org.mozilla.javascript.Context.compileImpl(Context.java:2368)</div><div>at org.mozilla.javascript.Context.compileString(Context.java:1359)</div><div>at org.mozilla.javascript.Context.compileString(Context.java:1348)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:240)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:1)</div><div>at java.security.AccessController.doPrivileged(Native Method)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:236)</div><div>at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:1)</div><div>at org.eclipse.birt.core.script.ScriptContext.compile(ScriptContext.java:148)</div><div>at org.eclipse.birt.report.engine.executor.ExecutionContext.compile(ExecutionContext.java:779)</div><div>at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:713)</div><div>at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluateString(ReportItemExecutor.java:297)</div><div>at org.eclipse.birt.report.engine.executor.ReportItemExecutor.processAction(ReportItemExecutor.java:440)</div><div>at org.eclipse.birt.report.engine.executor.LabelItemExecutor.execute(LabelItemExecutor.java:63)</div><div>at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)</div><div>at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)</div><div>at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)</div><div>at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)</div><div>at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)</div><div>at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)</div><div>at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:258)</div><div>at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)</div><div>at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)</div><div>at fi.reporting.ReportServlet.doPost(ReportServlet.java:807)</div><div>at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)</div><div>at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)</div><div>at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)</div><div>at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)</div><div>at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)</div><div>at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)</div><div>at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)</div><div>at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)</div><div>at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)</div><div>at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)</div><div>at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)</div><div>at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)</div><div>at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)</div><div>at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)</div><div>at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)</div><div>at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)</div><div>at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</div><div>at java.lang.Thread.run(Unknown Source)</div><p> </p></blockquote><p> </p></div></div><p>This happens on iRunTask.run(); so I believe I missed some configuration to handle hyperlinks in report.</p><p> </p><p>Any idea on how to solve this?</p><p> </p><p>Regards,</p><p> </p><p>Jeremy</p>