Uh-Oh (re: #786618) [message #786751] |
Mon, 30 January 2012 14:35  |
Eclipse User |
|
|
|
I just tried the solution presented in message #786618 to accomplish a redirect upon an error condition (bad DB username / password). This seems to work fine from the Designer, but when I deploy the report to Tomcat, I get the following (note that the code resides in the onCreate event of a table (id=935).
Any idea what I need to do differently to make this work from the web viewer (deployed to Tomcat)?
TypeError: Cannot call method "getTask" of null (/report/body/table[@id="935"]/method[@name="onCreate"]#5) (Element ID:935)
birt.core.JavascriptCommonError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "var taskid =
reportContext.getHttpServletRequest().getAttribute("attributeBean").getTaskId();
var mytask =
reportContext.getHttpServletRequest().getSession().getAttribute("tasks").get(taskid).getTask();
if( !mytask.getErrors().isEmpty() ){
//you could iterate the errors here as well
reportContext.setGlobalVariable("myerrors",true);
}else{
reportContext.setGlobalVariable("myerrors", false);
}":
TypeError: Cannot call method "getTask" of null (/report/body/table[@id="935"]/method[@name="onCreate"]#5) (Element ID:935)
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06283 seconds