created an attachment (id=162887)
event handler manejadorpolizasprestamos 

hi, 

running report with 2.5.2 find an exception that not find with birt 2.3.2, the exception is :

advertencia: unhandled exception when executing script.
org.eclipse.birt.report.engine.api.engineexception: unhandled exception when executing script.
	at org.eclipse.birt.report.engine.script.internal.scriptexecutor.addexception(scriptexecutor.java:162)
	at org.eclipse.birt.report.engine.script.internal.reportscriptexecutor.handlebeforefactory(reportscriptexecutor.java:82)
	at org.eclipse.birt.report.engine.api.impl.enginetask.startfactory(enginetask.java:1656)
	at org.eclipse.birt.report.engine.api.impl.runandrendertask.dorun(runandrendertask.java:97)
	at org.eclipse.birt.report.engine.api.impl.runandrendertask.run(runandrendertask.java:75)
	at es.bancopastor.artabro.hercules.ejecucion.servicios.gestorformularios.generador.generadormanager.processrequest(generadormanager.java:207)
	at es.bancopastor.artabro.hercules.ejecucion.servicios.gestorformularios.serviciogestorformulariosservidor.ejecutarpeticion(serviciogestorformulariosservidor.java:74)
	at es.bancopastor.artabro.hercules.ejecucion.servicios.gestorformularios.serviciogestorformularios.ejecutarpeticionsincrona(serviciogestorformularios.java:189)
	at es.bancopastor.artabro.hercules.ejecucion.servicios.gestorformularios.serviciogestorformularios.ejecutarpeticionsincrona(serviciogestorformularios.java:305)
	at es.bancopastor.dorna.multicanal.operation.generarformulariooperation.run(generarformulariooperation.java:28)
	at es.bancopastor.dorna.multicanal.serviciomulticanalprocesos.recibirpeticion(serviciomulticanalprocesos.java:69)
	at es.bancopastor.dorna.listener.socketlistener.leer(socketlistener.java:92)
	at es.bancopastor.dorna.listener.socketlistener.access$100(socketlistener.java:17)
	at es.bancopastor.dorna.listener.socketlistener$2.run(socketlistener.java:61)
caused by: java.lang.runtimeexception: org.eclipse.birt.report.model.api.command.contentexception: element "grid("c88")" is not allowed to be added into the (content) of "grid("gridclausulas").rows[0].cells[0]", for it is already in the design tree.
	at es.bancopastor.hercules.birt.manejadores.polizasprestamos.manejadorpolizasprestamos.beforefactory(manejadorpolizasprestamos.java:57)
	at org.eclipse.birt.report.engine.script.internal.reportscriptexecutor.handlebeforefactory(reportscriptexecutor.java:79)
	... 12 more
caused by: org.eclipse.birt.report.model.api.command.contentexception: element "grid("c88")" is not allowed to be added into the (content) of "grid("gridclausulas").rows[0].cells[0]", for it is already in the design tree.
	at org.eclipse.birt.report.model.util.contentexceptionfactory.createcontentexception(contentexceptionfactory.java:43)
	at org.eclipse.birt.report.model.command.abstractcontentcommand.add(abstractcontentcommand.java:120)
	at org.eclipse.birt.report.model.command.abstractcontentcommand.add(abstractcontentcommand.java:255)
	at org.eclipse.birt.report.model.api.slothandle.add(slothandle.java:126)
	at org.eclipse.birt.report.model.api.slothandle.add(slothandle.java:80)
	at es.bancopastor.hercules.birt.manejadores.polizasprestamos.manejadorpolizasprestamos.beforefactory(manejadorpolizasprestamos.java:54)

i attach the event handles manejadorpolizasprestamos where the exception occurs.
it only happen when the flow is in side of 

		if(eih==null){
								eih=(gridhandle)library.findelement(token);
								eih.clearproperty("visibility");
}


i think that it is because that gridhandle already exits, but it exists in a library...in 2.3.2 it runs always ok.
are anything changed in the api ? 

thanks in advance.
reassign to de team
the script is not correct. birt 2.5.2 did more robust check when adds an element. 

if(eih==null){
						eih=(gridhandle)library.findelement(token);
							eih.clearproperty("visibility");}

if(eih!=null){
try {							
    cell.getcontent( ).add(eih  );
    ....
}

the element from the library cannot be added to the report design cell directly. please make a copy.
please correct script.
script corrected