How to Insert Images In Birt At Runtime Language (Java)












3















I am able to Create a Birt Report in My Rcp Application But the Problem is I was Unable to add Images in to My Table Data (Cell Data)



The Path or Location for the Image is in My WorkSpace. My Question is How can i set a Path or Location For the Image Which will Display In the Report Table . We have SetURL Method for Image Handler but it was Giving an Error As Follows



enter code here



'TextItemHandle cellData = null;



CellHandle contenCell = null;



contentCell = (CellHandle) tabledetail.getCells().get(0);



cellData = designFactory.newTextItem(value);



cellData.setContent(value.replace(" ", ""));



cellData.setProperty("canShrink", "false");



cellData.getPropertyHandle(StyleHandle.FONT_SIZE_PROP).setIntValue(10);



image = designFactory.newImage("");
image.setURL("platform:/plugin/com.****.reportgeneration/images/Information-icon.gif");
contentCell.getContent().add(cellData);

contentCell.getContent().add(image); '



Full Stack of Exception




org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2375)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:191)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.createReportFolder(ModuleReportGeneration.java:465)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.access$0(ModuleReportGeneration.java:402)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration$1.run(ModuleReportGeneration.java:325)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.mozilla.javascript.EvaluatorException: invalid flag after regular expression (#1)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:64)
at org.mozilla.javascript.Parser.addError(Parser.java:188)
at org.mozilla.javascript.Parser.addError(Parser.java:166)
at org.mozilla.javascript.Parser.reportError(Parser.java:223)
at org.mozilla.javascript.Parser.reportError(Parser.java:210)
at org.mozilla.javascript.Parser.reportError(Parser.java:203)
at org.mozilla.javascript.TokenStream.readRegExp(TokenStream.java:921)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2798)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:2406)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:2304)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:2229)
at org.mozilla.javascript.Parser.addExpr(Parser.java:2213)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:2194)
at org.mozilla.javascript.Parser.relExpr(Parser.java:2169)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:2141)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:2130)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:2119)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:2108)
at org.mozilla.javascript.Parser.andExpr(Parser.java:2097)
at org.mozilla.javascript.Parser.orExpr(Parser.java:2086)
at org.mozilla.javascript.Parser.condExpr(Parser.java:2062)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:2033)
at org.mozilla.javascript.Parser.expr(Parser.java:2012)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1039)
at org.mozilla.javascript.Parser.nameOrLabel(Parser.java:1793)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1032)
at org.mozilla.javascript.Parser.statement(Parser.java:901)
at org.mozilla.javascript.Parser.parse(Parser.java:540)
at org.mozilla.javascript.Parser.parse(Parser.java:478)
at org.mozilla.javascript.Context.compileImpl(Context.java:2348)
at org.mozilla.javascript.Context.compileString(Context.java:1335)
at org.mozilla.javascript.Context.compileString(Context.java:1324)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:240)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:236)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:1)
at org.eclipse.birt.core.script.ScriptContext.compile(ScriptContext.java:153)
at org.eclipse.birt.report.engine.executor.ExecutionContext.compile(ExecutionContext.java:779)
at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:713)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluateString(ReportItemExecutor.java:297)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleURIImage(ImageItemExecutor.java:261)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleImage(ImageItemExecutor.java:214)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.execute(ImageItemExecutor.java:111)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)











share|improve this question




















  • 1





    Please provide some source code with what you are trying currently, and the full stack trace of the exception.

    – Florian Albrecht
    Nov 23 '18 at 9:26











  • Hi Florian , I have Updated My post Please Check Once .Thanks For your Concern.

    – veera venkatesh
    Nov 23 '18 at 10:07


















3















I am able to Create a Birt Report in My Rcp Application But the Problem is I was Unable to add Images in to My Table Data (Cell Data)



The Path or Location for the Image is in My WorkSpace. My Question is How can i set a Path or Location For the Image Which will Display In the Report Table . We have SetURL Method for Image Handler but it was Giving an Error As Follows



enter code here



'TextItemHandle cellData = null;



CellHandle contenCell = null;



contentCell = (CellHandle) tabledetail.getCells().get(0);



cellData = designFactory.newTextItem(value);



cellData.setContent(value.replace(" ", ""));



cellData.setProperty("canShrink", "false");



cellData.getPropertyHandle(StyleHandle.FONT_SIZE_PROP).setIntValue(10);



image = designFactory.newImage("");
image.setURL("platform:/plugin/com.****.reportgeneration/images/Information-icon.gif");
contentCell.getContent().add(cellData);

contentCell.getContent().add(image); '



Full Stack of Exception




org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2375)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:191)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.createReportFolder(ModuleReportGeneration.java:465)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.access$0(ModuleReportGeneration.java:402)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration$1.run(ModuleReportGeneration.java:325)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.mozilla.javascript.EvaluatorException: invalid flag after regular expression (#1)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:64)
at org.mozilla.javascript.Parser.addError(Parser.java:188)
at org.mozilla.javascript.Parser.addError(Parser.java:166)
at org.mozilla.javascript.Parser.reportError(Parser.java:223)
at org.mozilla.javascript.Parser.reportError(Parser.java:210)
at org.mozilla.javascript.Parser.reportError(Parser.java:203)
at org.mozilla.javascript.TokenStream.readRegExp(TokenStream.java:921)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2798)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:2406)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:2304)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:2229)
at org.mozilla.javascript.Parser.addExpr(Parser.java:2213)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:2194)
at org.mozilla.javascript.Parser.relExpr(Parser.java:2169)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:2141)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:2130)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:2119)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:2108)
at org.mozilla.javascript.Parser.andExpr(Parser.java:2097)
at org.mozilla.javascript.Parser.orExpr(Parser.java:2086)
at org.mozilla.javascript.Parser.condExpr(Parser.java:2062)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:2033)
at org.mozilla.javascript.Parser.expr(Parser.java:2012)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1039)
at org.mozilla.javascript.Parser.nameOrLabel(Parser.java:1793)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1032)
at org.mozilla.javascript.Parser.statement(Parser.java:901)
at org.mozilla.javascript.Parser.parse(Parser.java:540)
at org.mozilla.javascript.Parser.parse(Parser.java:478)
at org.mozilla.javascript.Context.compileImpl(Context.java:2348)
at org.mozilla.javascript.Context.compileString(Context.java:1335)
at org.mozilla.javascript.Context.compileString(Context.java:1324)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:240)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:236)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:1)
at org.eclipse.birt.core.script.ScriptContext.compile(ScriptContext.java:153)
at org.eclipse.birt.report.engine.executor.ExecutionContext.compile(ExecutionContext.java:779)
at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:713)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluateString(ReportItemExecutor.java:297)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleURIImage(ImageItemExecutor.java:261)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleImage(ImageItemExecutor.java:214)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.execute(ImageItemExecutor.java:111)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)











share|improve this question




















  • 1





    Please provide some source code with what you are trying currently, and the full stack trace of the exception.

    – Florian Albrecht
    Nov 23 '18 at 9:26











  • Hi Florian , I have Updated My post Please Check Once .Thanks For your Concern.

    – veera venkatesh
    Nov 23 '18 at 10:07
















3












3








3








I am able to Create a Birt Report in My Rcp Application But the Problem is I was Unable to add Images in to My Table Data (Cell Data)



The Path or Location for the Image is in My WorkSpace. My Question is How can i set a Path or Location For the Image Which will Display In the Report Table . We have SetURL Method for Image Handler but it was Giving an Error As Follows



enter code here



'TextItemHandle cellData = null;



CellHandle contenCell = null;



contentCell = (CellHandle) tabledetail.getCells().get(0);



cellData = designFactory.newTextItem(value);



cellData.setContent(value.replace(" ", ""));



cellData.setProperty("canShrink", "false");



cellData.getPropertyHandle(StyleHandle.FONT_SIZE_PROP).setIntValue(10);



image = designFactory.newImage("");
image.setURL("platform:/plugin/com.****.reportgeneration/images/Information-icon.gif");
contentCell.getContent().add(cellData);

contentCell.getContent().add(image); '



Full Stack of Exception




org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2375)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:191)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.createReportFolder(ModuleReportGeneration.java:465)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.access$0(ModuleReportGeneration.java:402)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration$1.run(ModuleReportGeneration.java:325)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.mozilla.javascript.EvaluatorException: invalid flag after regular expression (#1)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:64)
at org.mozilla.javascript.Parser.addError(Parser.java:188)
at org.mozilla.javascript.Parser.addError(Parser.java:166)
at org.mozilla.javascript.Parser.reportError(Parser.java:223)
at org.mozilla.javascript.Parser.reportError(Parser.java:210)
at org.mozilla.javascript.Parser.reportError(Parser.java:203)
at org.mozilla.javascript.TokenStream.readRegExp(TokenStream.java:921)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2798)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:2406)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:2304)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:2229)
at org.mozilla.javascript.Parser.addExpr(Parser.java:2213)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:2194)
at org.mozilla.javascript.Parser.relExpr(Parser.java:2169)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:2141)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:2130)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:2119)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:2108)
at org.mozilla.javascript.Parser.andExpr(Parser.java:2097)
at org.mozilla.javascript.Parser.orExpr(Parser.java:2086)
at org.mozilla.javascript.Parser.condExpr(Parser.java:2062)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:2033)
at org.mozilla.javascript.Parser.expr(Parser.java:2012)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1039)
at org.mozilla.javascript.Parser.nameOrLabel(Parser.java:1793)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1032)
at org.mozilla.javascript.Parser.statement(Parser.java:901)
at org.mozilla.javascript.Parser.parse(Parser.java:540)
at org.mozilla.javascript.Parser.parse(Parser.java:478)
at org.mozilla.javascript.Context.compileImpl(Context.java:2348)
at org.mozilla.javascript.Context.compileString(Context.java:1335)
at org.mozilla.javascript.Context.compileString(Context.java:1324)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:240)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:236)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:1)
at org.eclipse.birt.core.script.ScriptContext.compile(ScriptContext.java:153)
at org.eclipse.birt.report.engine.executor.ExecutionContext.compile(ExecutionContext.java:779)
at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:713)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluateString(ReportItemExecutor.java:297)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleURIImage(ImageItemExecutor.java:261)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleImage(ImageItemExecutor.java:214)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.execute(ImageItemExecutor.java:111)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)











share|improve this question
















I am able to Create a Birt Report in My Rcp Application But the Problem is I was Unable to add Images in to My Table Data (Cell Data)



The Path or Location for the Image is in My WorkSpace. My Question is How can i set a Path or Location For the Image Which will Display In the Report Table . We have SetURL Method for Image Handler but it was Giving an Error As Follows



enter code here



'TextItemHandle cellData = null;



CellHandle contenCell = null;



contentCell = (CellHandle) tabledetail.getCells().get(0);



cellData = designFactory.newTextItem(value);



cellData.setContent(value.replace(" ", ""));



cellData.setProperty("canShrink", "false");



cellData.getPropertyHandle(StyleHandle.FONT_SIZE_PROP).setIntValue(10);



image = designFactory.newImage("");
image.setURL("platform:/plugin/com.****.reportgeneration/images/Information-icon.gif");
contentCell.getContent().add(cellData);

contentCell.getContent().add(image); '



Full Stack of Exception




org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2375)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:191)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.createReportFolder(ModuleReportGeneration.java:465)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration.access$0(ModuleReportGeneration.java:402)
at com.****.reportgeneration.popup.actions.ModuleReportGeneration$1.run(ModuleReportGeneration.java:325)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.mozilla.javascript.EvaluatorException: invalid flag after regular expression (#1)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:64)
at org.mozilla.javascript.Parser.addError(Parser.java:188)
at org.mozilla.javascript.Parser.addError(Parser.java:166)
at org.mozilla.javascript.Parser.reportError(Parser.java:223)
at org.mozilla.javascript.Parser.reportError(Parser.java:210)
at org.mozilla.javascript.Parser.reportError(Parser.java:203)
at org.mozilla.javascript.TokenStream.readRegExp(TokenStream.java:921)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2798)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:2406)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:2304)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:2229)
at org.mozilla.javascript.Parser.addExpr(Parser.java:2213)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:2194)
at org.mozilla.javascript.Parser.relExpr(Parser.java:2169)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:2141)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:2130)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:2119)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:2108)
at org.mozilla.javascript.Parser.andExpr(Parser.java:2097)
at org.mozilla.javascript.Parser.orExpr(Parser.java:2086)
at org.mozilla.javascript.Parser.condExpr(Parser.java:2062)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:2033)
at org.mozilla.javascript.Parser.expr(Parser.java:2012)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1039)
at org.mozilla.javascript.Parser.nameOrLabel(Parser.java:1793)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1032)
at org.mozilla.javascript.Parser.statement(Parser.java:901)
at org.mozilla.javascript.Parser.parse(Parser.java:540)
at org.mozilla.javascript.Parser.parse(Parser.java:478)
at org.mozilla.javascript.Context.compileImpl(Context.java:2348)
at org.mozilla.javascript.Context.compileString(Context.java:1335)
at org.mozilla.javascript.Context.compileString(Context.java:1324)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:240)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine$3.run(JavascriptEngine.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:236)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.compile(JavascriptEngine.java:1)
at org.eclipse.birt.core.script.ScriptContext.compile(ScriptContext.java:153)
at org.eclipse.birt.report.engine.executor.ExecutionContext.compile(ExecutionContext.java:779)
at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:713)
at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluateString(ReportItemExecutor.java:297)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleURIImage(ImageItemExecutor.java:261)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.handleImage(ImageItemExecutor.java:214)
at org.eclipse.birt.report.engine.executor.ImageItemExecutor.execute(ImageItemExecutor.java:111)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)








java birt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 10:05







veera venkatesh

















asked Nov 23 '18 at 5:09









veera venkateshveera venkatesh

284




284








  • 1





    Please provide some source code with what you are trying currently, and the full stack trace of the exception.

    – Florian Albrecht
    Nov 23 '18 at 9:26











  • Hi Florian , I have Updated My post Please Check Once .Thanks For your Concern.

    – veera venkatesh
    Nov 23 '18 at 10:07
















  • 1





    Please provide some source code with what you are trying currently, and the full stack trace of the exception.

    – Florian Albrecht
    Nov 23 '18 at 9:26











  • Hi Florian , I have Updated My post Please Check Once .Thanks For your Concern.

    – veera venkatesh
    Nov 23 '18 at 10:07










1




1





Please provide some source code with what you are trying currently, and the full stack trace of the exception.

– Florian Albrecht
Nov 23 '18 at 9:26





Please provide some source code with what you are trying currently, and the full stack trace of the exception.

– Florian Albrecht
Nov 23 '18 at 9:26













Hi Florian , I have Updated My post Please Check Once .Thanks For your Concern.

– veera venkatesh
Nov 23 '18 at 10:07







Hi Florian , I have Updated My post Please Check Once .Thanks For your Concern.

– veera venkatesh
Nov 23 '18 at 10:07














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53440918%2fhow-to-insert-images-in-birt-at-runtime-language-java%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53440918%2fhow-to-insert-images-in-birt-at-runtime-language-java%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'