GeeCON Prague 2014*
The moose likes JDBC and the fly likes BIRT (MyEclipse Reporting Tool) SQL Query (with strings) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "BIRT (MyEclipse Reporting Tool) SQL Query (with strings)" Watch "BIRT (MyEclipse Reporting Tool) SQL Query (with strings)" New topic
Author

BIRT (MyEclipse Reporting Tool) SQL Query (with strings)

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Hello I am using the following SQL Query and wondered if anyone has a suggestion on its syntax because it is not producing any data at this time:



--------------------------------------------

the error it is throwing is:


--------------------------------------------------------------------------------

The following items have errors:


ReportDesign (id = 1):
+ There are errors evaluating script "var a =['select innrq.case_id, innrq.srv_case_nbr, innrq.first_name, innrq.middle_name, innrq.last_name, innrq.death, innrq.created_on, innrq.disposition_desc, innrq.home_id, innrq.home_short_name,',
'MAX(visitation_location) as visitation_location, MAX(funeral_location) as funeral_location,',
'MAX(visitation_location) as gathering_location, MAX(funeral_location) as ceremony_location,',
'MAX(visitation_location) as committal_location, MAX(funeral_location) as family_gathering_location, vlp.place_type as visitation_place_type, flp.place_type as funeral_place_type, glp.place_type as gathering_place_type, cerlp.place_type as ceremony_place_type, comlp.place_type as committal_place_type, fglp.place_type as family_gathering_place_type',
' from (',
'select tc.ID as case_id, tc.srv_case_nbr, tc.first_name, tc.middle_name, tc.last_name, tc.death, tc.created_on,',
'ce.name as service_type, ce.case_event_date as service_date,',
' case when ce.EVENT_TYPE = \'VIS\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as visitation_location,',
' case when ce.EVENT_TYPE = \'FUN\'',
' then CAST(ce.case_event_info as xml).value(\'data((//REL_CHURCH)[1])\', \'varchar(100)\') end as funeral_location,',
' case when ce.EVENT_TYPE = \'GAT\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as gathering_location,',
' case when ce.EVENT_TYPE = \'CER\'',
' then CAST(ce.case_event_info as xml).value(\'data((//REL_CHURCH)[1])\', \'varchar(100)\') end as ceremony_location,',
' case when ce.EVENT_TYPE = \'COM\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as committal_location,',
' case when ce.EVENT_TYPE = \'FAM\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as family_gathering_location,',
'h.ID as home_id, rd.Disposition_Desc,',
'ce.CASE_EVENT_INFO, ce.EVENT_TYPE,home_short_name',
' from the_case tc with (nolock)',
' inner join home h with (nolock) on (h.ID = tc.HOME_ID)',
' inner join Case_Event ce with (nolock) on (ce.CASE_ID = tc.ID and ce.CASE_EVENT_DATE is Not null)',
' inner join r_DISPOSITION rd with (nolock) on (rd.ID = tc.DISPOSITION_ID)'].join('\n');

var parmcount = params["homeName"].value.length
var whereclause = "";
if ( parmcount > 0 ){
whereclause = " where h.home_short_name in ( "
}
for ( i=0; i < parmcount; i++ ){
if( i == 0 ){
whereclause = whereclause +"'" + params["homeName"].value[i] + "'" ;
} else {
whereclause = whereclause + " ,'"+ params["homeName"].value[i] +"'";
}
if ( parmcount > 0 ){
whereclause = whereclause + " ) and tc.created_on between"+" '"+params["startDate"].value+"' and '"+params["endDate"].value+"') innrq ";
}
var b =[' left outer join L_PLACES vlp on (visitation_location = vlp.name and vlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES flp on (funeral_location = flp.name and flp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES glp on (gathering_location = glp.name and glp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES cerlp on (ceremony_location = cerlp.name and cerlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES comlp on (committal_location = comlp.name and comlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES fglp on (family_gathering_location = fglp.name and fglp.HOME_ID = innrq.home_id)',
' group by case_id, srv_case_nbr, first_name, middle_name, last_name, death, innrq.created_on, disposition_desc, innrq.home_id,home_short_name, vlp.place_type, flp.place_type, glp.place_type, cerlp.place_type, comlp.place_type, fglp.place_type',
' having vlp.PLACE_TYPE like \'%Church%\' or flp.PLACE_TYPE like \'%Church%\' or glp.PLACE_TYPE like \'%Church%\' or cerlp.PLACE_TYPE like \'%Church%\' or comlp.PLACE_TYPE like \'%Church%\' or fglp.PLACE_TYPE like \'%Church%\'',
' order by SRV_CASE_NBR, case_id;'].join('\n');
var k = a + whereclause + b;

logToDebugWindow(k);

this.queryText=k;

}
":
{1}.
Error.ScriptEvaluationError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "var a =['select innrq.case_id, innrq.srv_case_nbr, innrq.first_name, innrq.middle_name, innrq.last_name, innrq.death, innrq.created_on, innrq.disposition_desc, innrq.home_id, innrq.home_short_name,',
'MAX(visitation_location) as visitation_location, MAX(funeral_location) as funeral_location,',
'MAX(visitation_location) as gathering_location, MAX(funeral_location) as ceremony_location,',
'MAX(visitation_location) as committal_location, MAX(funeral_location) as family_gathering_location, vlp.place_type as visitation_place_type, flp.place_type as funeral_place_type, glp.place_type as gathering_place_type, cerlp.place_type as ceremony_place_type, comlp.place_type as committal_place_type, fglp.place_type as family_gathering_place_type',
' from (',
'select tc.ID as case_id, tc.srv_case_nbr, tc.first_name, tc.middle_name, tc.last_name, tc.death, tc.created_on,',
'ce.name as service_type, ce.case_event_date as service_date,',
' case when ce.EVENT_TYPE = \'VIS\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as visitation_location,',
' case when ce.EVENT_TYPE = \'FUN\'',
' then CAST(ce.case_event_info as xml).value(\'data((//REL_CHURCH)[1])\', \'varchar(100)\') end as funeral_location,',
' case when ce.EVENT_TYPE = \'GAT\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as gathering_location,',
' case when ce.EVENT_TYPE = \'CER\'',
' then CAST(ce.case_event_info as xml).value(\'data((//REL_CHURCH)[1])\', \'varchar(100)\') end as ceremony_location,',
' case when ce.EVENT_TYPE = \'COM\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as committal_location,',
' case when ce.EVENT_TYPE = \'FAM\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as family_gathering_location,',
'h.ID as home_id, rd.Disposition_Desc,',
'ce.CASE_EVENT_INFO, ce.EVENT_TYPE,home_short_name',
' from the_case tc with (nolock)',
' inner join home h with (nolock) on (h.ID = tc.HOME_ID)',
' inner join Case_Event ce with (nolock) on (ce.CASE_ID = tc.ID and ce.CASE_EVENT_DATE is Not null)',
' inner join r_DISPOSITION rd with (nolock) on (rd.ID = tc.DISPOSITION_ID)'].join('\n');

var parmcount = params["homeName"].value.length
var whereclause = "";
if ( parmcount > 0 ){
whereclause = " where h.home_short_name in ( "
}
for ( i=0; i < parmcount; i++ ){
if( i == 0 ){
whereclause = whereclause +"'" + params["homeName"].value[i] + "'" ;
} else {
whereclause = whereclause + " ,'"+ params["homeName"].value[i] +"'";
}
if ( parmcount > 0 ){
whereclause = whereclause + " ) and tc.created_on between"+" '"+params["startDate"].value+"' and '"+params["endDate"].value+"') innrq ";
}
var b =[' left outer join L_PLACES vlp on (visitation_location = vlp.name and vlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES flp on (funeral_location = flp.name and flp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES glp on (gathering_location = glp.name and glp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES cerlp on (ceremony_location = cerlp.name and cerlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES comlp on (committal_location = comlp.name and comlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES fglp on (family_gathering_location = fglp.name and fglp.HOME_ID = innrq.home_id)',
' group by case_id, srv_case_nbr, first_name, middle_name, last_name, death, innrq.created_on, disposition_desc, innrq.home_id,home_short_name, vlp.place_type, flp.place_type, glp.place_type, cerlp.place_type, comlp.place_type, fglp.place_type',
' having vlp.PLACE_TYPE like \'%Church%\' or flp.PLACE_TYPE like \'%Church%\' or glp.PLACE_TYPE like \'%Church%\' or cerlp.PLACE_TYPE like \'%Church%\' or comlp.PLACE_TYPE like \'%Church%\' or fglp.PLACE_TYPE like \'%Church%\'',
' order by SRV_CASE_NBR, case_id;'].join('\n');
var k = a + whereclause + b;

logToDebugWindow(k);

this.queryText=k;

}
":
{1}.
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:96)
at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:246)
at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleBeforeOpen(DataSetScriptExecutor.java:101)
at org.eclipse.birt.data.engine.impl.DataSetRuntime.beforeOpen(DataSetRuntime.java:534)
at org.eclipse.birt.data.engine.impl.QueryExecutor.dataSetBeforeOpen(QueryExecutor.java:209)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:320)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:145)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:616)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:265)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1890)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
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.HTMLPageLM.layout(HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:928)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
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:112)
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:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:318)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to execute script in function __bm_beforeOpen(). Source:
------
" + var a =['select innrq.case_id, innrq.srv_case_nbr, innrq.first_name, innrq.middle_name, innrq.last_name, innrq.death, innrq.created_on, innrq.disposition_desc, innrq.home_id, innrq.home_short_name,',
'MAX(visitation_location) as visitation_location, MAX(funeral_location) as funeral_location,',
'MAX(visitation_location) as gathering_location, MAX(funeral_location) as ceremony_location,',
'MAX(visitation_location) as committal_location, MAX(funeral_location) as family_gathering_location, vlp.place_type as visitation_place_type, flp.place_type as funeral_place_type, glp.place_type as gathering_place_type, cerlp.place_type as ceremony_place_type, comlp.place_type as committal_place_type, fglp.place_type as family_gathering_place_type',
' from (',
'select tc.ID as case_id, tc.srv_case_nbr, tc.first_name, tc.middle_name, tc.last_name, tc.death, tc.created_on,',
'ce.name as service_type, ce.case_event_date as service_date,',
' case when ce.EVENT_TYPE = \'VIS\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as visitation_location,',
' case when ce.EVENT_TYPE = \'FUN\'',
' then CAST(ce.case_event_info as xml).value(\'data((//REL_CHURCH)[1])\', \'varchar(100)\') end as funeral_location,',
' case when ce.EVENT_TYPE = \'GAT\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as gathering_location,',
' case when ce.EVENT_TYPE = \'CER\'',
' then CAST(ce.case_event_info as xml).value(\'data((//REL_CHURCH)[1])\', \'varchar(100)\') end as ceremony_location,',
' case when ce.EVENT_TYPE = \'COM\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as committal_location,',
' case when ce.EVENT_TYPE = \'FAM\'',
' then CAST(ce.case_event_info as xml).value(\'data((//Location)[1])\', \'varchar(100)\') end as family_gathering_location,',
'h.ID as home_id, rd.Disposition_Desc,',
'ce.CASE_EVENT_INFO, ce.EVENT_TYPE,home_short_name',
' from the_case tc with (nolock)',
' inner join home h with (nolock) on (h.ID = tc.HOME_ID)',
' inner join Case_Event ce with (nolock) on (ce.CASE_ID = tc.ID and ce.CASE_EVENT_DATE is Not null)',
' inner join r_DISPOSITION rd with (nolock) on (rd.ID = tc.DISPOSITION_ID)'].join('\n');

var parmcount = params["homeName"].value.length
var whereclause = "";
if ( parmcount > 0 ){
whereclause = " where h.home_short_name in ( "
}
for ( i=0; i < parmcount; i++ ){
if( i == 0 ){
whereclause = whereclause +"'" + params["homeName"].value[i] + "'" ;
} else {
whereclause = whereclause + " ,'"+ params["homeName"].value[i] +"'";
}
if ( parmcount > 0 ){
whereclause = whereclause + " ) and tc.created_on between"+" '"+params["startDate"].value+"' and '"+params["endDate"].value+"') innrq ";
}
var b =[' left outer join L_PLACES vlp on (visitation_location = vlp.name and vlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES flp on (funeral_location = flp.name and flp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES glp on (gathering_location = glp.name and glp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES cerlp on (ceremony_location = cerlp.name and cerlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES comlp on (committal_location = comlp.name and comlp.HOME_ID = innrq.home_id)',
' left outer join L_PLACES fglp on (family_gathering_location = fglp.name and fglp.HOME_ID = innrq.home_id)',
' group by case_id, srv_case_nbr, first_name, middle_name, last_name, death, innrq.created_on, disposition_desc, innrq.home_id,home_short_name, vlp.place_type, flp.place_type, glp.place_type, cerlp.place_type, comlp.place_type, fglp.place_type',
' having vlp.PLACE_TYPE like \'%Church%\' or flp.PLACE_TYPE like \'%Church%\' or glp.PLACE_TYPE like \'%Church%\' or cerlp.PLACE_TYPE like \'%Church%\' or comlp.PLACE_TYPE like \'%Church%\' or fglp.PLACE_TYPE like \'%Church%\'',
' order by SRV_CASE_NBR, case_id;'].join('\n');
var k = a + whereclause + b;

logToDebugWindow(k);

this.queryText=k;

}
+ "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: Report parameter "homeName" does not exist.
Script source: /report/data-sets/oda-data-set[@id="14"]/method[@name="beforeOpen"], line: 0, text:
__bm_beforeOpen()
at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:147)
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:90)
... 73 more
Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: Report parameter "homeName" does not exist.
Script source: /report/data-sets/oda-data-set[@id="14"]/method[@name="beforeOpen"], line: 0, text:
__bm_beforeOpen()
at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:1005)
at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:138)
... 74 more
Caused by: org.eclipse.birt.core.exception.CoreException: Error evaluating Javascript expression. Script engine error: Report parameter "homeName" does not exist.
Script source: /report/data-sets/oda-data-set[@id="14"]/method[@name="beforeOpen"], line: 0, text:
__bm_beforeOpen()
at org.eclipse.birt.core.script.JavascriptEvalUtil.wrapRhinoException(JavascriptEvalUtil.java:303)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:102)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateScript(JavascriptEvalUtil.java:134)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:1001)
... 75 more
Caused by: org.mozilla.javascript.JavaScriptException: Report parameter "homeName" does not exist.
at org.eclipse.birt.core.script.ScriptableParameters.get(ScriptableParameters.java:41)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1617)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1390)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1372)
at org.mozilla.javascript.gen.c158._c1(/report/data-sets/oda-data-set[@id="14"]/method[@name="beforeOpen"]:28)
at org.mozilla.javascript.gen.c158.call(/report/data-sets/oda-data-set[@id="14"]/method[@name="beforeOpen"])
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
at org.mozilla.javascript.gen.c10._c0(/report/data-sets/oda-data-set[@id="9"]/method[@name="beforeOpen"]:0)
at org.mozilla.javascript.gen.c10.call(/report/data-sets/oda-data-set[@id="9"]/method[@name="beforeOpen"])
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c10.call(/report/data-sets/oda-data-set[@id="9"]/method[@name="beforeOpen"])
at org.mozilla.javascript.gen.c10.exec(/report/data-sets/oda-data-set[@id="9"]/method[@name="beforeOpen"])
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:95)
... 77 more


Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

it is telling you your sql doesn't compile, the best thing to do is display the "var a" on the screen and run that yourself against the database until it works.

 
GeeCON Prague 2014
 
subject: BIRT (MyEclipse Reporting Tool) SQL Query (with strings)