zerglicious Posted April 18, 2008 Share Posted April 18, 2008 I have a report with a Scriptlet which works fine in IReport but is failing validation on JasperServer because JasperServer can't find the scriptlet class on the classpath. I built the JasperServer from the source so it will be easy enough to put the scriptlet class in the /WEB-INF/classes directory but I was trying to upload the scriptlet as a jar in the JasperServer console. Is this the proper procedure for reports with Scriptlets? Link to comment Share on other sites More sharing options...
lucianc Posted April 25, 2008 Share Posted April 25, 2008 zerglicious wrote:Is this the proper procedure for reports with Scriptlets? Yes, report scriptlets should be deployed into JasperServer report unit jar resources. You can see a working example in the /reports/samples/SalesByMonth report unit from the JS samples. Regards,Lucian Link to comment Share on other sites More sharing options...
fcramy Posted May 26, 2009 Share Posted May 26, 2009 could you explain how this works a little more, please?In the SalesByMonth sample report i see this line:scriptletClass="test.TestScriptlet"as an attribute in the JasperReport tag. What is the significance of the "test." piece of the string? Link to comment Share on other sites More sharing options...
vishal29bhp Posted May 27, 2009 Share Posted May 27, 2009 HiI tried a lot to make Scriptlet working in iReport but no luck. Every time when i add jar to the classpath and run the report it shows nothing also no error. How do you make scriplet can you explain me the steps for creating it in iReport. VishalPost Edited by vishal29bhp at 05/27/2009 10:11 Link to comment Share on other sites More sharing options...
lucianc Posted May 27, 2009 Share Posted May 27, 2009 fc_rbaWrote: What is the significance of the "test." piece of the string? It's the Java package to which the scriptlet class belongs.Regards,Lucian Link to comment Share on other sites More sharing options...
coombsj Posted July 21, 2009 Share Posted July 21, 2009 Where can I find documentation concerning scriptlets?Thanks, Link to comment Share on other sites More sharing options...
fcramy Posted December 16, 2009 Share Posted December 16, 2009 The sample reports are all well and good, but they tell nothing of where the scriptlets are supposed to go within JasperServer. In fact, i've found very little documentation in terms of how JasperServer works behind the scenes. I'm just looking for a directory structure type of view for the report templates, scriptlets, et. al. Link to comment Share on other sites More sharing options...
swood Posted December 20, 2009 Share Posted December 20, 2009 You package the scriptlets as a JAR and put them in the JasperServer repository, not on the file system related to the WAR. Then you add the scriptlet JAR as a "resource" to the report unit definition. When you run the report, the scriptlet JAR is pulled from the repository and added to the server classpath temporarily. ShermanJaspersoft Link to comment Share on other sites More sharing options...
prasad23 Posted May 13, 2011 Share Posted May 13, 2011 Steps to use Scriptlets in Jasper Server:-----------------------------------------1.Fist create scriptlet for which you want to use.2.create a jar file for that scriptlet3.create a report set the class path of jar file4.use that scriptlet in your iReport report like:{SCRIPTLET}.functionname();5.put that Scriptlet class in scriptletClass="test.TestScriptlet"6.add this iReport to the JasperServer and place this jar file in add input contrtoller in the jasperserver Link to comment Share on other sites More sharing options...
prasad23 Posted May 13, 2011 Share Posted May 13, 2011 How can i use scriptlets in Adhoc Report using Domain Link to comment Share on other sites More sharing options...
svaldivia Posted May 26, 2011 Share Posted May 26, 2011 prasad23Wrote: Steps to use Scriptlets in Jasper Server: ----------------------------------------- 1.Fist create scriptlet for which you want to use. 2.create a jar file for that scriptlet 3.create a report set the class path of jar file 4.use that scriptlet in your iReport report like:{SCRIPTLET}.functionname(); 5.put that Scriptlet class in scriptletClass="test.TestScriptlet" 6.add this iReport to the JasperServer and place this jar file in add input contrtoller in the jasperserver already done! but when run the repo on jasperserver i get a "The report is empty." message!in the other hand i run it on Ireport and get the report ok!some idea what is happening? Link to comment Share on other sites More sharing options...
damerval Posted November 6, 2013 Share Posted November 6, 2013 In the event of an empty datasource, in the report properties, the "when no data" property should be set to "all sections, no detail" or "No data section". Link to comment Share on other sites More sharing options...
arnaudsimon091 Posted May 23, 2019 Share Posted May 23, 2019 Thanks you damerval ! It fixed my problem :D 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