#1 2015-04-20 07:33:07

ralex
Member
Registered: 2015-04-20

Importing a birt report with two input parameters

Hi All,
I'm setting up a new server reporting environment on my  network . In particular I'm migrating my birt report from open report to server report.
Below what I did :
1) Added data source which contains my data to run the reports --- Result : OK Connection Successful
2) Importing rptdesign report file and added two required parameters as text parameter(as set up on openreport) . I also assigned the key value, for each parameter, equals to the value written on the xml source of the report.

I saved everything and when I run it this is what I'm getting :

net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorRuntimeException at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:218) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:119) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exeucteReport(ReportExportServlet.java:527) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doExportReport(ReportExportServlet.java:407) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReport(ReportExportServlet.java:333) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReportViaSession(ReportExportServlet.java:326) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doGet(ReportExportServlet.java:164) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$532f12c4.CGLIB$doGet$1() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$532f12c4$$FastClassByGuice$$e265db45.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$532f12c4.doGet() at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$532f12c4.CGLIB$service$14() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$532f12c4$$FastClassByGuice$$e265db45.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$532f12c4.service() at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorRuntimeException: net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorRuntimeException at net.datenwerke.rs.birt.service.reportengine.BirtReportEngine.executeReport(BirtReportEngine.java:83) at net.datenwerke.rs.birt.service.reportengine.BirtReportEngine.doExecute(BirtReportEngine.java:70) at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:127) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186) ... 52 more Caused by: net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorRuntimeException at net.datenwerke.rs.birt.service.reportengine.output.generator.BirtPDFOutputGenerator.exportReport(BirtPDFOutputGenerator.java:45) at net.datenwerke.rs.birt.service.reportengine.sandbox.BirtEngineEnvironment.call(BirtEngineEnvironment.java:166) at net.datenwerke.rs.birt.service.reportengine.BirtReportEngine.executeReport(BirtReportEngine.java:81) ... 55 more Caused by: org.eclipse.birt.report.engine.api.impl.ParameterValidationException: Required parameter cod_facolta is not set. at org.eclipse.birt.report.engine.api.impl.EngineTask.validateAbstractScalarParameter(EngineTask.java:803) at org.eclipse.birt.report.engine.api.impl.EngineTask.access$0(EngineTask.java:789) at org.eclipse.birt.report.engine.api.impl.EngineTask$ParameterValidationVisitor.visitScalarParameter(EngineTask.java:706) at org.eclipse.birt.report.engine.api.impl.EngineTask$ParameterVisitor.visit(EngineTask.java:1531) at org.eclipse.birt.report.engine.api.impl.EngineTask.doValidateParameters(EngineTask.java:692) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:95) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77) at net.datenwerke.rs.birt.service.reportengine.output.generator.BirtPDFOutputGenerator.exportReport(BirtPDFOutputGenerator.java:33) ... 57 more


As far as I understand it seems that parameters aren't bound to the key values that I had inserted ......
In addition to this issue, I have another question :
When I add a birt report there are two input field name and key....what does key mean? would it be  the unique ID for the report? Do I need to insert it ?
Any help is appreciated .

Ale

Offline

#2 2015-04-20 13:58:53

ralex
Member
Registered: 2015-04-20

Re: Importing a birt report with two input parameters

Hi, I figured out the problem....inside parameter tab, add a text parameter and write under "key" column the exact name of parameter you defined into your birt report . That's it!
Now I want to run it via URL, but it says that the required parameter cus_country  is BLANK....I'm using this kind of URL :

http://localhost:8080/reportserver/reportserver/httpauthexport?id=8705&format=pdf&user=test&password=test&cus_country=USA

Maybe Do I need to define the parameter in different way as soon as I'm going to run the report via URL???
Thanks

Offline

#3 2015-04-20 14:33:51

Thorsten J. Krause
Guest

Re: Importing a birt report with two input parameters

Hi ralex,

glad to hear you got this working. To pass parameter values via the url you have to prefix the parameter key with "p_" so in the above example your url should be
http://localhost:8080/reportserver/reportserver/httpauthexport?id=8705&format=pdf&user=test&password=test&p_cus_country=USA

Cheers,
Thorsten

#4 2015-04-21 07:43:41

ralex
Member
Registered: 2015-04-20

Re: Importing a birt report with two input parameters

Yes, I got it smile.....

Cheers,

Alex

Offline

#5 2015-04-21 13:51:20

ralex
Member
Registered: 2015-04-20

Re: Importing a birt report with two input parameters

Hi Thorsten, I've got a new question for you smile. As far as I understand to run a report via URL we need to specify in the httpauthexecute.cf file a username and password (even virtual/dummy user, that's to say is not a real account in the reportserver) to be pasted via get method and we also need to specify one or more real users who are allowed to run the report.What is th advantage to do this?
Thanks again

Alex

Offline

#6 2015-04-23 10:35:44

Thorsten J. Krause
Guest

Re: Importing a birt report with two input parameters

Hi Alex,

some reports (for example those that use uservariables) might yield different results when run by different users.
As the username/password in httpauthexecute.cf is independent from the real system users you need to provide a mapping to a real user.

Cheers,
Thorsten

Board footer

Powered by FluxBB