Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to include a runtime value in a rpttemplate file
How to include a runtime value in a rpttemplate file [message #237029] Tue, 08 May 2007 15:51 Go to next message
Eclipse UserFriend
Originally posted by: xxxx.xxx.com

Hi Jason,

I am creating a new rpttemplate file and I would like to add a data
element with an expression like params["report_name"], I include this
element as part of the template file, but when this rpttemplate file is
modified using teh Desing ApI I get the following error, can you please
let me know what method(s) do I need to use to make the value
"params[report_name]" available in the render phase.

The report_name parameter is being passed to the BIRT viewer to the
servlet that manipulates the rpttemplate file.Please see the error below..


The following items have errors:


Data (id = 23):
- Invalid expression to retrieve value in presentation.
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.util.ExprResultSe t.getValue(ExprResultSet.java:130)
at
org.eclipse.birt.data.engine.impl.document.ResultIterator.ge tValue(ResultIterator.java:150)
at
org.eclipse.birt.report.engine.data.dte.QueryResultSet.getVa lue(QueryResultSet.java:309)
at
org.eclipse.birt.report.engine.internal.executor.doc.Abstrac tReportReader$1.visitData(AbstractReportReader.java:368)
at
org.eclipse.birt.report.engine.content.impl.DataContent.acce pt(DataContent.java:111)
at
org.eclipse.birt.report.engine.content.ContentVisitorAdapter .visit(ContentVisitorAdapter.java:9)
at
org.eclipse.birt.report.engine.internal.executor.doc.ReportI temReader.initializeContent(ReportItemReader.java:263)
at
org.eclipse.birt.report.engine.internal.executor.doc.ReportI temReader.execute(ReportItemReader.java:65)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportItemExecutor.execute(LocalizedReportItemExecutor.ja va:36)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:182)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:169)
at
org.eclipse.birt.report.engine.internal.document.v3.ReportCo ntentLoaderV3.loadPage(ReportContentLoaderV3.java:51)
at
org.eclipse.birt.report.engine.internal.document.ReportConte ntLoader.loadPage(ReportContentLoader.java:55)
at
org.eclipse.birt.report.engine.api.impl.RenderTask$PageRende r.load(RenderTask.java:482)
at
org.eclipse.birt.report.engine.api.impl.RenderTask$InnerRend er.render(RenderTask.java:414)
at
org.eclipse.birt.report.engine.api.impl.RenderTask.render(Re nderTask.java:311)
at
org.eclipse.birt.report.service.ReportEngineService.renderRe port(Unknown
Source) at
org.eclipse.birt.report.service.ReportEngineService.renderRe port(Unknown
Source) at
org.eclipse.birt.report.service.BirtViewerReportService.getP age(Unknown
Source) at
org.eclipse.birt.report.service.actionhandler.AbstractGetPag eActionHandler.doExecution(Unknown
Source) at
org.eclipse.birt.report.service.actionhandler.AbstractGetPag eActionHandler.__execute(Unknown
Source) at
org.eclipse.birt.report.service.actionhandler.AbstractBaseAc tionHandler.execute(Unknown
Source) at
org.eclipse.birt.report.soapengine.processor.AbstractBaseDoc umentProcessor.__executeAction(Unknown
Source) at
org.eclipse.birt.report.soapengine.processor.AbstractBaseCom ponentProcessor.executeAction(Unknown
Source) at
org.eclipse.birt.report.soapengine.processor.BirtDocumentPro cessor.handleGetPage(Unknown
Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324) at
org.eclipse.birt.report.soapengine.processor.AbstractBaseCom ponentProcessor.process(Unknown
Source) at
org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingI mpl.getUpdatedObjects(Unknown
Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324) at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCP rovider.java:397)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RP CProvider.java:186)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvi der.java:323)
at
org.apache.axis.strategies.InvocationStrategy.visit(Invocati onStrategy.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(AxisServle t.java:699) at
org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherSer vlet.doPost(Unknown
Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationA ction.run(ServletStubImpl.java:1006)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(Serv letStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.jav a:28) at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCha inImpl.java:27)
at
com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalSer vletFilter.java:293)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCha inImpl.java:27)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvoca tionAction.run(WebAppServletContext.java:6724)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Aut henticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityMana ger.java:121)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet (WebAppServletContext.java:3764)
at
weblogic.servlet.internal.ServletRequestImpl.execute(Servlet RequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219 ) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Re: How to include a runtime value in a rpttemplate file [message #237061 is a reply to message #237029] Tue, 08 May 2007 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Is there a parameter in your template named report_name?

Jason

Birt Guy wrote:
>
> Hi Jason,
>
> I am creating a new rpttemplate file and I would like to add a data
> element with an expression like params["report_name"], I include this
> element as part of the template file, but when this rpttemplate file is
> modified using teh Desing ApI I get the following error, can you please
> let me know what method(s) do I need to use to make the value
> "params[report_name]" available in the render phase.
>
> The report_name parameter is being passed to the BIRT viewer to the
> servlet that manipulates the rpttemplate file.Please see the error below..
>
>
> The following items have errors:
>
> Data (id = 23): - Invalid expression to retrieve value in presentation.
> 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.util.ExprResultSe t.getValue(ExprResultSet.java:130)
> at
> org.eclipse.birt.data.engine.impl.document.ResultIterator.ge tValue(ResultIterator.java:150)
> at
> org.eclipse.birt.report.engine.data.dte.QueryResultSet.getVa lue(QueryResultSet.java:309)
> at
> org.eclipse.birt.report.engine.internal.executor.doc.Abstrac tReportReader$1.visitData(AbstractReportReader.java:368)
> at
> org.eclipse.birt.report.engine.content.impl.DataContent.acce pt(DataContent.java:111)
> at
> org.eclipse.birt.report.engine.content.ContentVisitorAdapter .visit(ContentVisitorAdapter.java:9)
> at
> org.eclipse.birt.report.engine.internal.executor.doc.ReportI temReader.initializeContent(ReportItemReader.java:263)
> at
> org.eclipse.birt.report.engine.internal.executor.doc.ReportI temReader.execute(ReportItemReader.java:65)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportItemExecutor.execute(LocalizedReportItemExecutor.ja va:36)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:182)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:190)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportExecutor.execute(LocalizedReportExecutor.java:169)
> at
> org.eclipse.birt.report.engine.internal.document.v3.ReportCo ntentLoaderV3.loadPage(ReportContentLoaderV3.java:51)
> at
> org.eclipse.birt.report.engine.internal.document.ReportConte ntLoader.loadPage(ReportContentLoader.java:55)
> at
> org.eclipse.birt.report.engine.api.impl.RenderTask$PageRende r.load(RenderTask.java:482)
> at
> org.eclipse.birt.report.engine.api.impl.RenderTask$InnerRend er.render(RenderTask.java:414)
> at
> org.eclipse.birt.report.engine.api.impl.RenderTask.render(Re nderTask.java:311)
> at
> org.eclipse.birt.report.service.ReportEngineService.renderRe port(Unknown
> Source) at
> org.eclipse.birt.report.service.ReportEngineService.renderRe port(Unknown
> Source) at
> org.eclipse.birt.report.service.BirtViewerReportService.getP age(Unknown
> Source) at
> org.eclipse.birt.report.service.actionhandler.AbstractGetPag eActionHandler.doExecution(Unknown
> Source) at
> org.eclipse.birt.report.service.actionhandler.AbstractGetPag eActionHandler.__execute(Unknown
> Source) at
> org.eclipse.birt.report.service.actionhandler.AbstractBaseAc tionHandler.execute(Unknown
> Source) at
> org.eclipse.birt.report.soapengine.processor.AbstractBaseDoc umentProcessor.__executeAction(Unknown
> Source) at
> org.eclipse.birt.report.soapengine.processor.AbstractBaseCom ponentProcessor.executeAction(Unknown
> Source) at
> org.eclipse.birt.report.soapengine.processor.BirtDocumentPro cessor.handleGetPage(Unknown
> Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324) at
> org.eclipse.birt.report.soapengine.processor.AbstractBaseCom ponentProcessor.process(Unknown
> Source) at
> org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingI mpl.getUpdatedObjects(Unknown
> Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324) at
> org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCP rovider.java:397)
> at
> org.apache.axis.providers.java.RPCProvider.processMessage(RP CProvider.java:186)
> at
> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvi der.java:323)
> at
> org.apache.axis.strategies.InvocationStrategy.visit(Invocati onStrategy.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(AxisServle t.java:699)
> at
> org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherSer vlet.doPost(Unknown
> Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationA ction.run(ServletStubImpl.java:1006)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Serv letStubImpl.java:419)
> at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.jav a:28) at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCha inImpl.java:27)
> at
> com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalSer vletFilter.java:293)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCha inImpl.java:27)
> at
> weblogic.servlet.internal.WebAppServletContext$ServletInvoca tionAction.run(WebAppServletContext.java:6724)
> at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Aut henticatedSubject.java:321)
> at
> weblogic.security.service.SecurityManager.runAs(SecurityMana ger.java:121)
> at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet (WebAppServletContext.java:3764)
> at
> weblogic.servlet.internal.ServletRequestImpl.execute(Servlet RequestImpl.java:2644)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219 ) at
> weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>
>
Re: How to include a runtime value in a rpttemplate file [message #237073 is a reply to message #237061] Tue, 08 May 2007 17:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xxxx.xxx.com

Hi Jason,

No there is no parameter, but I pass the parameter &report_name=xyz in the
BIRT viewer URL and try to refer to that parameter in the data element in
the template which has an expression set as params["report_name"].

Do I still need a parameter in the .rpttemplate file?

Thx.
Re: How to include a runtime value in a rpttemplate file [message #237096 is a reply to message #237073] Tue, 08 May 2007 17:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

If you want to use that expression, you have to have it as a report
parameter. If you do not want a report parameter use an expression that
gets the request parameters object.
Like:
"MyParm=" + reportContext.getHttpServletRequest().getParameter("MyParm");

For more request object examples look at
http://wiki.eclipse.org/index.php/Retrieve_Session_informati on_in_Script_%28BIRT%29


Jason

Birt Guy wrote:
> Hi Jason,
>
> No there is no parameter, but I pass the parameter &report_name=xyz in
> the BIRT viewer URL and try to refer to that parameter in the data
> element in the template which has an expression set as
> params["report_name"].
>
> Do I still need a parameter in the .rpttemplate file?
>
> Thx.
>
Re: How to include a runtime value in a rpttemplate file [message #241360 is a reply to message #237096] Wed, 06 June 2007 17:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jallen.gmail.com

Hi Jason,

I am getting the same error "Invalid expression to retrieve value in
presentation" when tried to export a report using CSV emitter. The
report contains container (List) and I am trying to display the
parameter inside a Grid row (the grid is inserted into the list).

Can you please see if there is something wrong in here?

Thanks

Jason Weathersby wrote:
> If you want to use that expression, you have to have it as a report
> parameter. If you do not want a report parameter use an expression that
> gets the request parameters object.
> Like:
> "MyParm=" + reportContext.getHttpServletRequest().getParameter("MyParm");
>
> For more request object examples look at
> http://wiki.eclipse.org/index.php/Retrieve_Session_informati on_in_Script_%28BIRT%29
>
>
>
> Jason
>
> Birt Guy wrote:
>> Hi Jason,
>>
>> No there is no parameter, but I pass the parameter &report_name=xyz in
>> the BIRT viewer URL and try to refer to that parameter in the data
>> element in the template which has an expression set as
>> params["report_name"].
>>
>> Do I still need a parameter in the .rpttemplate file?
>>
>> Thx.
>>
Re: How to include a runtime value in a rpttemplate file [message #241388 is a reply to message #241360] Wed, 06 June 2007 22:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xxxxxxxx.xxx.com

Can you post your expression that you use to retrieve the value in the
grid with in the template, are you passing it as a parameter in teh URL?
Re: How to include a runtime value in a rpttemplate file [message #908099 is a reply to message #241360] Tue, 04 September 2012 18:04 Go to previous messageGo to next message
anita tolety is currently offline anita toletyFriend
Messages: 9
Registered: September 2012
Junior Member
I am using 3.7.2 run time engine in our application. when i try to view teh report which has script in before open method which modifies the query text by inserting report parameters, I get the following error:
org.eclipse.birt.report.engine.api.EngineException: Invalid expression to retrieve value in presentation. (Element ID:376)

Please guide how to proceed.

Thank you,
Anita
Re: How to include a runtime value in a rpttemplate file [message #908589 is a reply to message #908099] Wed, 05 September 2012 15:59 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you post the report?

Jason

On 9/4/2012 2:04 PM, anita tolety wrote:
> I am using 3.7.2 run time engine in our application. when i try to view
> teh report which has script in before open method which modifies the
> query text by inserting report parameters, I get the following error:
> org.eclipse.birt.report.engine.api.EngineException: Invalid expression
> to retrieve value in presentation. (Element ID:376)
>
> Please guide how to proceed.
>
> Thank you,
> Anita
Previous Topic:DOC export issue with Hyperlinks and Crosstabs
Next Topic:Max y-axis value on split bar chart
Goto Forum:
  


Current Time: Fri Nov 28 07:21:18 GMT 2014

Powered by FUDForum. Page generated in 0.06213 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software