Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Report # 3 Another Question
nuraniuscc
Hi Mike,
I had created 2 reports
Report 1 has 5 fields
Report 2 has 7 fields
The first five fields are exactly the same. Ok. But, I developed Report 2 first and then I copied the same report and Just removed those 2 columns that are not needed for this one.
So far Ok.
Now when I preview Report 1 "It complains about the 2 fields that I removed". So, to my amazement, the report layout does NOT have those 2 fields. But, the XML COde points to those 2 fields.
Now, I thought I will delete the XML code completely and then have BIRT regenerate it. But it's not allowing me to go further Until I save the changes.
My question is
I don't want to recreate the report (I took a backup before I did all this) and neither do I want to mess with the XML file. It's very easy to make a mistake there.
Is there any other way to solve this?
Thanks
Nurani Sivakumar
Find more posts tagged with
Comments
mwilliams
Hi Nurani,
After you delete those two columns, go to the binding tab in the property editor for the table and remove the bindings that you got rid of. This should solve the problem.
nuraniuscc
Hi Mike,
I did check that multiple times. I don't see those 2 columns in the "Binding" tab of the Table.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
Can you post the entire error you're receiving in here?
nuraniuscc
Hi Mike,
This is what I get.
The following items have errors:
Data (id = 849):
- Column binding "BAN" has referred to a data set column "BAN" which does not exist.
Cell (id = 271):
- Unhandled exception when executing script.
Error.UnhandledScriptError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: Unhandled exception when executing script. at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:199) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:176) at org.eclipse.birt.report.engine.script.internal.CellScriptExecutor.handleOnCreate(CellScriptExecutor.java:69) at org.eclipse.birt.report.engine.script.internal.OnCreateScriptVisitor.visitCell(OnCreateScriptVisitor.java:91) at org.eclipse.birt.report.engine.ir.CellDesign.accept(CellDesign.java:156) at org.eclipse.birt.report.engine.script.internal.OnCreateScriptVisitor.onCreate(OnCreateScriptVisitor.java:74) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.handleOnCreate(ReportItemExecutor.java:847) at org.eclipse.birt.report.engine.executor.CellExecutor.execute(CellExecutor.java:52) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45) at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:33) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.initalizeChildren(HTMLInlineStackingLM.java:69) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:151) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:27) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:133) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:68) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:27) at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:65) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:133) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:68) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:27) at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:76) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:133) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:68) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:151) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:72) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:928) at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:876) at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:123) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:89) at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:159) at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPageAll(BirtDocumentProcessor.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:111) at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112) at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:269) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)Caused by: org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "row=this.getRowData( ); countOfRows += 1;":ReferenceError: "countOfRows" is not defined. (/report/body/table/footer/row[
@id="
;269"]/cell[
@id="
;271"]/method[
@name="
;onCreate"]#1). at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:639) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleJSInternal(ScriptExecutor.java:60) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleJS(ScriptExecutor.java:47) at org.eclipse.birt.report.engine.script.internal.CellScriptExecutor.handleOnCreate(CellScriptExecutor.java:61) ... 74 moreCaused by: org.mozilla.javascript.EcmaError: ReferenceError: "countOfRows" is not defined. (/report/body/table/footer/row[
@id="
;269"]/cell[
@id="
;271"]/method[
@name="
;onCreate"]#1) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340) at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3413) at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1678) at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1617) at org.mozilla.javascript.gen.c25._c0(/report/body/table/footer/row[
@id="
;269"]/cell[
@id="
;271"]/method[
@name="
;onCreate"]:1) at org.mozilla.javascript.gen.c25.call(/report/body/table/footer/row[
@id="
;269"]/cell[
@id="
;271"]/method[
@name="
;onCreate"]) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) at org.mozilla.javascript.gen.c25.call(/report/body/table/footer/row[
@id="
;269"]/cell[
@id="
;271"]/method[
@name="
;onCreate"]) at org.mozilla.javascript.gen.c25.exec(/report/body/table/footer/row[
@id="
;269"]/cell[
@id="
;271"]/method[
@name="
;onCreate"]) at org.eclipse.birt.core.script.ScriptContext.eval(ScriptContext.java:241) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:635) ... 77 more
mwilliams
Nurani,
Check all your report items for the use of 'BAN'. If you can find the item with id #849, that's where it should be. For the other error, it looks like you're probably using a variable that's not been initialized.
nuraniuscc
Hi Mike,
Ok, I got rid of the 2 fields that it was complaining about. They both were made to HIDE. So, what I did is cleared out all the BIND stuff and reset it to the table, Bang there it was.
Yanked them out of there and now that is Gone.
But the other error is still there and I am unable to find the data element by the ID. (I actually clicked on each cell) and checked the number.
Is there a smarter way to list all the cell ID's for a report?
Thanks
Nurani Sivakumar
mwilliams
Nurani,
The second error is on a cell, not a data element. It's in the onCreate method of a row or cell. Wherever you use the countOfRows variable. Make sure you've initialize this variable in the initialize method of your report.