Bug 134948 [Regression]Store procedure and output parameter doesn't work in Web Viewer
Description: Store procedure and output parameter doesn't work in Web Viewer Steps to reproduce: 1. Preview attached report in Web Viewer/html/pdf, which called store procedure in dataset and used output parameter to output value. Result: Preview in Web Viewer will display errors: Error0 : data.engine.InValidExpr ( 1 time(s) ) detail : org.eclipse.birt.data.engine.core.DataException: Invalid expression to retrieve value in presentation. at org.eclipse.birt.data.engine.impl.document.RDLoad.getValue(RDLoad.java:201) at org.eclipse.birt.data.engine.impl.document.ResultIterator.getValue(ResultIterator.java:184) at org.eclipse.birt.report.engine.data.dte.DteResultSet.evaluate(DteResultSet.java:149) at org.eclipse.birt.report.engine.presentation.ReportContentLoader.openQuery(ReportContentLoader.java:807) at org.eclipse.birt.report.engine.presentation.ReportContentLoader.startContent(ReportContentLoader.java:883) at org.eclipse.birt.report.engine.presentation.ReportContentLoader.loadFullContent(ReportContentLoader.java:346) at org.eclipse.birt.report.engine.presentation.ReportContentLoader.excutePage(ReportContentLoader.java:221) at org.eclipse.birt.report.engine.presentation.ReportContentLoader.loadPage(ReportContentLoader.java:163) at org.eclipse.birt.report.engine.api.impl.RenderTask.doRender(RenderTask.java:182) at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRender.render(RenderTask.java:452) at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:387) at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:90) at org.eclipse.birt.report.service.ReportEngineService.renderReport(Unknown Source) at org.eclipse.birt.report.soapengine.processor.DocumentProcessor.doRenderReport(Unknown Source) at org.eclipse.birt.report.soapengine.processor.DocumentProcessor.process(Unknown Source) at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(Unknown Source) at sun.reflect.GeneratedMethodAccessor63.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:453) 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(Unknown Source) at org.eclipse.birt.report.servlet.ViewerServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.eclipse.tomcat.internal.EclipseErrorReportValve.invoke(EclipseErrorReportValve.java:153) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source)
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/RDSave.java
import org.eclipse.birt.data.engine.impl.document.viewing.TransformUtil;
/**
 * Save expression value of every row into report document. The output format in
 * stream is, <expressCount, [expression id, expression value]*>.
 * 
 * When no value of one row is saved, the expressionCount will automatically be
 * ouptput as 0. It will happen when caller does not call getValue on this row
 * or call skipToEnd method.
 */
public class RDSave
{
		 
	private DataEngineContext context;
	private String queryResultID;
	
	
	private String subQueryName;
	private String subQueryID;
	
	
	private int rowCount;
	
	private int lastRowIndex;
	
	private OutputStream rowOs;
	private DataOutputStream rowDos;
	
	private OutputStream lenOs;
	private DataOutputStream lenDos;
	private byte[] zeroBytes;