You are not logged in.
We have a series of reports that need to pass dates to the report that is registered on ReportServer and is accessed via a URL and RS will not pick up the date parameter value from the URL. When the report is run, it simply uses the default value configured on the report and not the parameter value from the URL.
I could not find how to attach a file to this message so the code to put into the dynamic text field on a report is:
"This is a dynamic text box showing the report parameter StartDate: "
+ params["StartDate"].value
This requires no data, is all that needs to be put on the report, and it shows the problem we are having. Below are the URL's we have been trying, with place holders for the server, user name, and user password for the URL setup.
Update Note: We tested some of our reports that use different types of parameters like ints and they also are not being picked up by ReportServer when called from a URL.
The format for the URL's we are using are below:
URL that executes, but no parameter picked up by report (the report does come up from RS with the default parameter value):
http://<our server and port>/reportserver/reportserver/httpauthexport?user=<ourusername>&password=<ourpassword>&format=PDF&key=birt_date_test&StartDate=2015-12-31
We have tried adding a parameter to the BIRT report registered in RS, but it blows up when we try to execute the report. Here are the URLs we have been trying and the resulting error thrown:
With a ReportServer parameter added to the report registration both these formats produce the error below the URLs:
http://<our server and port>/reportserver/reportserver/httpauthexport?user=<ourusername>&password=<ourpassword>&format=PDF&key=birt_date_test&p_StartDate=2015-12-31
http://<our server and port>/reportserver/reportserver/httpauthexport?user=<ourusername>&password=<ourpassword>&format=PDF&key=birt_date_test&StartDate=2015-12-31
Error: An error occured during report execution.
The report could not be executed: java.lang.NullPointerException
To get help please contact an administrator.
Details
net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: java.lang.NullPointerException 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.exportReportById(ReportExportServlet.java:270) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReportByIdViaRequest(ReportExportServlet.java:261) at net.datenwerke.rs.incubator.server.httpauthexecute.HttpAuthExecuteServlet.doGet(HttpAuthExecuteServlet.java:100) at net.datenwerke.rs.incubator.server.httpauthexecute.HttpAuthExecuteServlet$$EnhancerByGuice$$d368ad70.CGLIB$doGet$0() at net.datenwerke.rs.incubator.server.httpauthexecute.HttpAuthExecuteServlet$$EnhancerByGuice$$d368ad70$$FastClassByGuice$$4c8603f6.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.incubator.server.httpauthexecute.HttpAuthExecuteServlet$$EnhancerByGuice$$d368ad70.doGet() at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at net.datenwerke.rs.incubator.server.httpauthexecute.HttpAuthExecuteServlet$$EnhancerByGuice$$d368ad70.CGLIB$service$15() at net.datenwerke.rs.incubator.server.httpauthexecute.HttpAuthExecuteServlet$$EnhancerByGuice$$d368ad70$$FastClassByGuice$$4c8603f6.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.incubator.server.httpauthexecute.HttpAuthExecuteServlet$$EnhancerByGuice$$d368ad70.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:957) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:188) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2516) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2505) 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: java.lang.NullPointerException 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) ... 54 more Caused by: java.lang.NullPointerException at net.datenwerke.rs.birt.service.reportengine.sandbox.BirtEngineEnvironment.call(BirtEngineEnvironment.java:99) at net.datenwerke.rs.birt.service.reportengine.BirtReportEngine.executeReport(BirtReportEngine.java:81) ... 57 more
Thanks for any help
Ed
Last edited by mongonv (2015-10-07 17:54:02)
Offline
Hi Ed,
did you also define the parameters in ReportServer (parameter tab of the report configuration). Although this seems redundant, when using the url to pass the report values, it's still required.
With this defined correctly the following url works for me:
.../reportserver/httpauthexport?user=test&password=test&format=HTML&p_StartDate=2015-01-01
One other thing to pay attention to is the format in which you pass the date: This uses the plattform default of the server ReportServer is running on, so it might not be yyyy-mm-dd.
Hope that helps,
Thorsten
Hey Thorsten,
We tried setting up a RS parameter and that is when we got the error shown in my first message. We could not find any configuration of the parameter that did not throw that error for all types of exports (html, pdf, etc.)
We tried the "p_" trick and everything we could think of or find in the purchased documentation, we also tried some reports that only send int values and they also do not reflect the parameter in the report when executed.
"With this defined correctly the following url works for me:"
Can you tell me how you set up that parameter, cause we could not find any configuration that worked with that simple dynamic text value.
How do we find what the default date format is for the installation and how do we set it to what we need?
Thanks for you help,
Ed
Offline
Hi Ed,
this is what I did:
- created a birt report with a single Dynamic Text field and the value params["StartDate"].value and the matching parameter with name "StartDate" of type Date
- uploaded the rptdesign file to a new birt report in ReportServer and used the "Extract Parameters" function (topmost toolbar in the parameter screen) to create matching parameters in rs.
- executed the report from the user interface to make sure the parameter works as expected
- made the necessary configuration changes to make the report available via httpauthexport
- executed the report via its url, without setting the parameter to make sure the httpauthexport work regardless of the parameter. http://.../httpauthexport?...&format=HTML&id=60
- update the url to set the parameter value
http://.../httpauthexport?...&format=HTML&id=60p_StartDate=07.05.2015
(in my case with dd.MM.yyyy date format, as my computer is configured to use german settings)
if the date format is the issue you will get a different error message from the one you posted, saying: "Could not parse date: 2015/01/01". The expected format depends on the country setting you operating system uses. So just try what ever is common in your country. (This will configurable in later versions of ReportServer, but currently it is not)
Cheers,
Thorsten
Hey Thorsten,
We were able to get the dates and other params to pass on the URL after doing the extra extraction step.
A couple of follow up questions:
1) Is there a way to not have to do that extraction when registering new reports?
2) We changed the date format in the OS localization settings, but it did not seem to impact the format of dates prompted by RS when running the report in RS. How do we get RS to utilize the same format as the OS localization settings? (Using windows server 2008)
3) If we call a report from a url it does not seem to prompt for any parameters that are not passed on the url, is there a way to have the BIRT prompts for the values used?
Thanks much for your help,
Ed
Offline