Printing large summary report in web client

In Servoy 5.0.1, I have a print form which has 3 summary parts and 12 summary fields. When printing 5000 records in this form, Servoy seems to take too long (Servoy takes an hour where FileMaker takes 10 minutes) and is displaying 100’s of the following error:

2010-02-20 10:28 http-8080-2 WARN com.servoy.j2db.util.Debug Flushing foundset with no selection: FoundSet[Table:orde,Size: 22,CachedRecords: 0,SELECTED INDEX: -1]
java.lang.RuntimeException: Flushing foundset with no selection
at com.servoy.j2db.dataprocessing.FoundSet.flushAllCachedItems(FoundSet.java:939)
at com.servoy.j2db.Za.Zk.Ze(Zk.java:67)
at com.servoy.j2db.Za.Zk.Ze(Zk.java:42)
at com.servoy.j2db.Za.Zk.Ze(Zk.java:42)
at com.servoy.j2db.Za.Zq.Zd(Zq.java:57)
at com.servoy.j2db.Za.Zh.Za(Zh.java:183)
at com.servoy.j2db.Za.Zh.print(Zh.java:32)
at com.servoy.extensions.plugins.pdf_output.PDFPrinterJob.print(PDFPrinterJob.java:164)
at com.servoy.extensions.plugins.pdf_output.PDFDocPrintJob.print(PDFDocPrintJob.java:68)
at com.servoy.j2db.server.headlessclient.WebForm.print(WebForm.java:72)
at com.servoy.j2db.Zpb.print(Zpb.java:1077)
at com.servoy.j2db.FormController$JSForm.js_print(FormController.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3127)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.Zsb.executeFunction(Zsb.java:74)
at com.servoy.j2db.scripting.Ztb.executeFunction(Ztb.java:116)
at com.servoy.j2db.Zpb.Za(Zpb.java:1007)
at com.servoy.j2db.Zpb.Za(Zpb.java:273)
at com.servoy.j2db.Zvb.Za(Zvb.java:8)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:54)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:33)
at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:13)
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.onEvent(WebEventExecutor.java:209)
at com.servoy.j2db.server.headlessclient.dataui.Zjd.onEvent(Zjd.java:1)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:299)
at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:113)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)

The code I use to print off this form is :

function printSummary()
{
	if(databaseManager.hasRecords(comp_to_orde))
	{
		forms.orde_lst_p_invd_s.controller.loadRecords(comp_to_orde)
		forms.orde_lst_p_invd_s.controller.show()
		forms.orde_lst_p_invd_s.controller.sort( 'agen_id asc, prod_id asc')
		forms.orde_lst_p_invd_s.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
		forms.orde_lst_p_invd_s.controller.loadAllRecords()
		forms.agen_frm_reports.controller.show()
	}
}

In debugger, all steps fire instantly except the print step. The relationship is a simple ‘comp_id to comp_id’ relationship. This was working in v4.1. Is anyone else experiencing these issues.

those errors are just warnings/debug statements, they are not errors and shouldnt matter to much for you.

We already fixed the warning. You could try the 5.1 release.

If that is still slow then you should first look what queries are generated to the database and if they have the right indexes

Taken from case notes care of Sanneke at Servoy:
Because the report takes 6 minutes to be created, the problem is that the webclient has a timeout time that is lower than that. I think what you can do best is use the new headlessclient plugin in 5.1. What you can do then is start a method on the server that makes the report, if the report is finished it can callback a method on the webclient which can show the report to the user, that way you don’t have problems with the timeout time. Note that a headless client also consumes one license, only when you are using it.

Check out the headlessclient plugin, you will need this functions:
plugins.headlessclient.createClient(solutionName, username, password, Object solutionOpenMethodArgs)
.queueMethod(context, methodName, Object args, Function callbackFunction)

The other solution I received is to use iReport.