mulcamd Posted May 16, 2012 Share Posted May 16, 2012 How can I, from within a scriptlet, retrieve the name of a report.The name of the report is in the JRXML <jasperReport ... name="TestImage" ...>So in my scriptlet I want to access the name attribute and get TestImage.Please could anyone drop a line of scriptlet code ...Code:<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="TestImage" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> Link to comment Share on other sites More sharing options...
yyun Posted May 18, 2012 Share Posted May 18, 2012 i don't know how to retrieve the report name in scriptlet directly, but one workaround is that you can define a paramete in .jrxml and set the default value to the report name, then get this paramete in scriptlet. 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