NOjeil Posted October 10, 2013 Share Posted October 10, 2013 Hello All ,I have a jasperDesign object where i am looping the elements of the details band and i am filling the properties map of a specific JRTextField as followingJRTextField textField = (JRTextField) element; textField.getPropertiesMap().setProperty("PropName","PropVal");After compiling the jasperDesign and getting the JasperPrint object , i looped the elements of the JasperPrint but when i retrieved the value of the previous texfield wich is now a JRTemplatePrintText object ,i found the properties map is nullMy question is how can i set a property for a specific element in jasperDesign and get this value from the jasperPrint ?Thank you in advance Link to comment Share on other sites More sharing options...
lucianc Posted October 16, 2013 Share Posted October 16, 2013 Properties are not automatically transferred to print object, you'll need to configure a property that provides a prefix for properties to be transferred. E.g. add the following to your jasperreports.propertiesnet.sf.jasperreports.print.transfer.my.props=my.prefixand then set my.prefix.* properties to elements.Regards,Lucian Link to comment Share on other sites More sharing options...
NOjeil Posted November 7, 2013 Author Share Posted November 7, 2013 Thank you Lucian , your solution helped meRegards 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