rickn Posted February 29, 2012 Share Posted February 29, 2012 I created a report that uses the scriptlet listed below. The report runs in iReport but not when I deploy it to the JasperServer on the same machine. The report scriptlet property is set to "com.gbi.MyScriptlet" and the JAR file was added as a resource to the report. I tried using the JAR resource from the repository and as an uploaded local file but the results were the same. When I open a report with input controls, i just get a blank page. If there are no input controls, the "Please wait Loading..." box comes up but never goes away.I'm new to Jaspersoft and Java so any help will be greatly appreciated. Code:package com.gbi;import net.sf.jasperreports.engine.JRDefaultScriptlet;import net.sf.jasperreports.engine.JRScriptletException;import java.util.*;public class MyScriptlet extends JRDefaultScriptlet{ long pageInitTime; @Override public void beforePageInit() throws JRScriptletException { pageInitTime = new java.util.Date().getTime(); } public long getLastPageTime() { long now = new java.util.Date().getTime(); return new Long(now - pageInitTime); } public String ArrayToString(Collection coll) { // create comma-delimited string from collection StringBuilder str = new StringBuilder(""); Iterator it = coll.iterator(); while (it.hasNext()) { str.append(it.next()); str.append(","); } return (str.substring(0,str.length()-1)); }} Link to comment Share on other sites More sharing options...
yhlim22 Posted March 5, 2013 Share Posted March 5, 2013 Hi, I am facing the exact same problem as you. Have you found a solution to this yet? Link to comment Share on other sites More sharing options...
g.glazewski Posted September 3, 2013 Share Posted September 3, 2013 Same problem. It's really hard to develop anything useful with this stuff. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now