#1 2015-11-27 07:27:13

s.farael
Member
Registered: 2015-09-11

Problems to use javascript to refresh

Hi,

I created a report that auto updates, using javascript and the same was imported and presented as successfully dashboard. But after the second refresh it fails to update presenting the accompanying errors.

imported
image bbcode dashboard
first refresh
image1 bbcode dashboard1
second refresh
image2 bbcode dashboard2
(the alert it's only check de url)



Error: An error occured during report execution.
The report could not be executed: Unsupported format HTM encountered. The following formats are supported: [WORD, PDF, HTML, PNG, EXCEL]
To get help please contact an administrator.
Details
net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: Unsupported format HTM encountered. The following formats are supported: [WORD, PDF, HTML, PNG, EXCEL] 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.core.server.reportexport.ReportExportServlet.doGet(ReportExportServlet.java:162) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$79d4ee2a.CGLIB$doGet$2() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$79d4ee2a$$FastClassByGuice$$4237ad62.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$$79d4ee2a.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$$79d4ee2a.CGLIB$service$14() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$79d4ee2a$$FastClassByGuice$$4237ad62.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$$79d4ee2a.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.UnsupportedFormatException: Unsupported format HTM encountered. The following formats are supported: [WORD, PDF, HTML, PNG, EXCEL] at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:120) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186) ... 54 more



This is the code i put in report as dynamic text on btrt:

<form name="input" onSubmit="return reloadPage();">

<script type="text/javascript">


function reloadPage() {
//alert("Reload time");
var temp = new String(location.href);
var targetURL = new String();

if(temp.indexOf("__overwrite=") != -1 ){
targetURL = temp.substring(0, temp.indexOf("&__overwrite") -1);
}else{
targetURL = temp;
} 

targetURL += "&__overwrite=true";

//alert( targetURL );	
location.replace(targetURL);

return false;
}

timer=setTimeout('reloadPage()', 5000);
</script>

</form>

Offline

#2 2015-11-27 07:51:42

s.farael
Member
Registered: 2015-09-11

Re: Problems to use javascript to refresh

Hi, i'm resolve using

 <form name="input" onSubmit="return reloadPage();">

<script type="text/javascript">

function reloadPage() {
var targetURL = new String(location.href);
location.replace(targetURL);
return false;
}

timer=setTimeout('reloadPage()', 60000);
</script>

</form>

Thanks

Offline

#3 2015-12-09 02:46:48

sdavies68
Member
Registered: 2015-02-11

Re: Problems to use javascript to refresh

Can you explain where you put this?

I am using dynamic reports and would like to do exactly the same to refresh automatically.

Offline

Board footer

Powered by FluxBB